Lines Matching refs:index

43  *   \li The index.  This is an unordered array of index entries
46 * transactions. The index entries are used as hints to
48 * serial number. Unused index entries have an "offset"
49 * field of zero. The size of the index can vary between
66 * to from the header or index. They may be preceded
178 * and end of the journal, and in the journal index to locate
212 /*% Number of index entries following the header. */
310 unsigned char *rawindex; /*%< In-core buffer for journal index in on-disk format */
311 journal_pos_t *index; /*%< In-core journal index */
502 void *mem; /* Memory for temporary index image. */
573 j->index = NULL;
622 * If there is an index, read the raw index into a dynamically
623 * allocated buffer and then convert it into a cooked index.
637 j->index = isc_mem_get(mctx, j->header.index_size *
639 if (j->index == NULL)
644 j->index[i].serial = decode_uint32(p);
646 j->index[i].offset = decode_uint32(p);
679 if (j->index != NULL)
680 isc_mem_put(j->mctx, j->index, j->header.index_size *
841 * If the index of the journal 'j' contains an entry "better"
850 if (j->index == NULL)
853 if (POS_VALID(j->index[i]) &&
854 DNS_SERIAL_GE(serial, j->index[i].serial) &&
855 DNS_SERIAL_GT(j->index[i].serial, best_guess->serial))
856 *best_guess = j->index[i];
861 * Add a new index entry. If there is no room, make room by removing
863 * half of the index. This decimates old index entries exponentially
864 * over time, so that the index always contains a much larger fraction
866 * most index searches are for outgoing IXFR, and IXFR tends to request
872 if (j->index == NULL)
878 if (! POS_VALID(j->index[i]))
887 j->index[k++] = j->index[i];
891 POS_INVALIDATE(j->index[k]);
896 INSIST(! POS_VALID(j->index[i]));
899 * Store the new index entry.
901 j->index[i] = *pos;
905 * Invalidate any existing index entries that could become
911 if (j->index == NULL)
914 if (! DNS_SERIAL_GT(serial, j->index[i].serial))
915 POS_INVALIDATE(j->index[i]);
932 * (from the journal, not just from the index), return ISC_R_NOTFOUND.
1149 * transaction. Also purge them from the index.
1192 * Update the index.
1197 * Convert the index into on-disk format and write
1241 if (j->index != NULL)
1242 isc_mem_put(j->mctx, j->index, j->header.index_size *
2166 if (POS_VALID(j1->index[i]) &&
2167 DNS_SERIAL_GE(serial, j1->index[i].serial) &&
2168 ((isc_uint32_t)(j1->header.end.offset - j1->index[i].offset)
2170 j1->index[i].offset > best_guess.offset)
2171 best_guess = j1->index[i];
2243 * Build new index.
2252 * Write index.
2323 encode_uint32(j->index[i].serial, p);
2325 encode_uint32(j->index[i].offset, p);