Lines Matching defs:index

51  *   \li The index.  This is an unordered array of index entries
54 * transactions. The index entries are used as hints to
56 * serial number. Unused index entries have an "offset"
57 * field of zero. The size of the index can vary between
74 * to from the header or index. They may be preceded
180 * and end of the journal, and in the journal index to locate
214 /*% Number of index entries following the header. */
306 unsigned char *rawindex; /*%< In-core buffer for journal index in on-disk format */
307 journal_pos_t *index; /*%< In-core journal index */
489 void *mem; /* Memory for temporary index image. */
558 j->index = NULL;
609 * If there is an index, read the raw index into a dynamically
610 * allocated buffer and then convert it into a cooked index.
624 j->index = isc_mem_get(mctx, j->header.index_size *
626 if (j->index == NULL)
631 j->index[i].serial = decode_uint32(p);
633 j->index[i].offset = decode_uint32(p);
663 if (j->index != NULL) {
664 isc_mem_put(j->mctx, j->index, j->header.index_size *
666 j->index = NULL;
821 * If the index of the journal 'j' contains an entry "better"
830 if (j->index == NULL)
833 if (POS_VALID(j->index[i]) &&
834 DNS_SERIAL_GE(serial, j->index[i].serial) &&
835 DNS_SERIAL_GT(j->index[i].serial, best_guess->serial))
836 *best_guess = j->index[i];
841 * Add a new index entry. If there is no room, make room by removing
843 * half of the index. This decimates old index entries exponentially
844 * over time, so that the index always contains a much larger fraction
846 * most index searches are for outgoing IXFR, and IXFR tends to request
852 if (j->index == NULL)
858 if (! POS_VALID(j->index[i]))
867 j->index[k++] = j->index[i];
871 POS_INVALIDATE(j->index[k]);
876 INSIST(! POS_VALID(j->index[i]));
879 * Store the new index entry.
881 j->index[i] = *pos;
885 * Invalidate any existing index entries that could become
891 if (j->index == NULL)
894 if (! DNS_SERIAL_GT(serial, j->index[i].serial))
895 POS_INVALIDATE(j->index[i]);
912 * (from the journal, not just from the index), return ISC_R_NOTFOUND.
1114 * transaction. Also purge them from the index.
1154 * Update the index.
1159 * Convert the index into on-disk format and write
1203 if (j->index != NULL)
1204 isc_mem_put(j->mctx, j->index, j->header.index_size *
2090 if (POS_VALID(j->index[i]) &&
2091 DNS_SERIAL_GE(serial, j->index[i].serial) &&
2092 ((isc_uint32_t)(j->header.end.offset - j->index[i].offset)
2094 j->index[i].offset > best_guess.offset)
2095 best_guess = j->index[i];
2165 * Build new index.
2174 * Write index.
2245 encode_uint32(j->index[i].serial, p);
2247 encode_uint32(j->index[i].offset, p);