Lines Matching defs:header

49  *   \li A fixed-size header of type journal_rawheader_t.
62 * Each transaction begins with a transaction header of type
63 * journal_rawxhdr_t. The transaction header is followed by a
74 * to from the header or index. They may be preceded
78 * the "end" position in the header. The latter will
179 * These are used in the journal header to locate the beginning
197 * The header is of a fixed size, with some spare room for future
203 * The on-disk representation of the journal header.
214 /*% Number of index entries following the header. */
217 /* Pad the header to a fixed size. */
222 * The on-disk representation of the transaction header.
226 unsigned char size[4]; /*%< In bytes, excluding header. */
232 * The on-disk representation of the RR header.
236 unsigned char size[4]; /*%< In bytes, excluding header. */
240 * The in-core representation of the journal header.
258 * The in-core representation of the transaction header.
268 * The in-core representation of the RR header.
276 * Initial contents to store in the header of a newly created
279 * The header starts with the magic string ";BIND LOG V9\n"
305 journal_header_t header; /*%< In-core journal header */
438 * Read/write a transaction header at the current file position.
467 * Read an RR header at the current file position.
485 journal_header_t header;
501 header = initial_journal_header;
502 header.index_size = index_size;
503 journal_header_encode(&header, &rawheader);
606 journal_header_decode(&rawheader, &j->header);
612 if (j->header.index_size != 0) {
617 rawbytes = j->header.index_size * sizeof(journal_rawpos_t);
624 j->index = isc_mem_get(mctx, j->header.index_size *
630 for (i = 0; i < j->header.index_size; i++) {
664 isc_mem_put(j->mctx, j->index, j->header.index_size *
784 if (pos->serial == j->header.end.serial)
787 * Read the header of the current transaction.
832 for (i = 0; i < j->header.index_size; i++) {
857 for (i = 0; i < j->header.index_size; i++) {
861 if (i == j->header.index_size) {
866 for (i = 0; i < j->header.index_size; i += 2) {
870 while (k < j->header.index_size) {
875 INSIST(i < j->header.index_size);
893 for (i = 0; i < j->header.index_size; i++) {
924 if (DNS_SERIAL_GT(j->header.begin.serial, serial))
926 if (DNS_SERIAL_GT(serial, j->header.end.serial))
928 if (serial == j->header.end.serial) {
929 *pos = j->header.end;
933 current_pos = j->header.begin;
960 if (JOURNAL_EMPTY(&j->header)) {
962 j->header.index_size * sizeof(journal_rawpos_t);
964 offset = j->header.end.offset;
973 * Write a dummy transaction header of all zeroes to reserve
1035 * Write the RR header.
1040 * Write the owner name, RR header, and RR data.
1097 if (! JOURNAL_EMPTY(&j->header)) {
1098 if (j->x.pos[0].serial != j->header.end.serial) {
1104 j->header.end.serial,
1113 * by stepping header.begin forward to the first addressable
1116 if (! JOURNAL_EMPTY(&j->header)) {
1118 j->header.begin.serial)) {
1119 CHECK(journal_next(j, &j->header.begin));
1135 * Update the transaction header.
1143 * Update the journal header.
1145 if (JOURNAL_EMPTY(&j->header)) {
1146 j->header.begin = j->x.pos[0];
1148 j->header.end = j->x.pos[1];
1149 journal_header_encode(&j->header, &rawheader);
1165 * Commit the header to stable storage.
1201 isc_mem_put(j->mctx, j->rawindex, j->header.index_size *
1204 isc_mem_put(j->mctx, j->index, j->header.index_size *
1387 if (JOURNAL_EMPTY(&j->header))
1508 return (j->header.begin.serial);
1512 return (j->header.end.serial);
1609 * Read another transaction header.
1636 * and a 10-byte header. The largest possible
1637 * RR has 65535 bytes of data, a header, and a maximum-
1670 * Check that the RR header is there, and parse it.
2050 if (JOURNAL_EMPTY(&j->header)) {
2055 if (DNS_SERIAL_GT(j->header.begin.serial, serial) ||
2056 DNS_SERIAL_GT(serial, j->header.end.serial)) {
2065 j->header.index_size * sizeof(journal_rawpos_t);
2072 if ((isc_uint32_t) j->header.end.offset < target_size) {
2088 best_guess = j->header.begin;
2089 for (i = 0; i < j->header.index_size; i++) {
2092 ((isc_uint32_t)(j->header.end.offset - j->index[i].offset)
2101 if (current_pos.serial == j->header.end.serial)
2105 ((isc_uint32_t)(j->header.end.offset - current_pos.offset)
2113 INSIST(best_guess.serial != j->header.end.serial);
2122 copy_length = j->header.end.offset - best_guess.offset;
2149 * Compute new header.
2151 new->header.begin.serial = best_guess.serial;
2152 new->header.begin.offset = indexend;
2153 new->header.end.serial = j->header.end.serial;
2154 new->header.end.offset = indexend + copy_length;
2157 * Update the journal header.
2159 journal_header_encode(&new->header, &rawheader);
2167 current_pos = new->header.begin;
2168 while (current_pos.serial != new->header.end.serial) {
2179 indexend = new->header.end.offset;
2236 if (j->header.index_size != 0) {
2241 rawbytes = j->header.index_size * sizeof(journal_rawpos_t);
2244 for (i = 0; i < j->header.index_size; i++) {