Lines Matching defs:xhdr

490 journal_read_xhdr(dns_journal_t *j, journal_xhdr_t *xhdr) {
502 xhdr->size = decode_uint32(raw.size);
503 xhdr->count = 0;
504 xhdr->serial0 = decode_uint32(raw.serial0);
505 xhdr->serial1 = decode_uint32(raw.serial1);
506 j->curxhdr = *xhdr;
516 xhdr->size = decode_uint32(raw.size);
517 xhdr->count = decode_uint32(raw.count);
518 xhdr->serial0 = decode_uint32(raw.serial0);
519 xhdr->serial1 = decode_uint32(raw.serial1);
520 j->curxhdr = *xhdr;
677 * still might have the new xhdr format because we
679 * the new xhdr. When we first try to read it, we assume
680 * it uses the new xhdr format. If that fails, we'll be
862 maybe_fixup_xhdr(dns_journal_t *j, journal_xhdr_t *xhdr, uint32_t serial,
870 if (xhdr->serial0 != serial ||
871 isc_serial_le(xhdr->serial1, xhdr->serial0))
873 if (j->xhdr_version == XHDR_VERSION1 && xhdr->serial1 == serial)
881 CHECK(journal_read_xhdr(j, xhdr));
884 xhdr->count == serial)
892 CHECK(journal_read_xhdr(j, xhdr));
913 } else if (j->xhdr_version == XHDR_VERSION2 && xhdr->count == serial &&
914 xhdr->serial1 == 0U &&
915 isc_serial_gt(xhdr->serial0, xhdr->count))
920 xhdr->serial1 = xhdr->serial0;
921 xhdr->serial0 = xhdr->count;
922 xhdr->count = 0;
949 journal_xhdr_t xhdr;
967 result = journal_read_xhdr(j, &xhdr);
973 CHECK(maybe_fixup_xhdr(j, &xhdr, pos->serial, pos->offset));
979 if (xhdr.serial0 != pos->serial ||
980 isc_serial_le(xhdr.serial1, xhdr.serial0))
985 j->filename, pos->serial, xhdr.serial0);
996 if ((off_t)(pos->offset + hdrsize + xhdr.size) < pos->offset) {
1002 pos->offset += hdrsize + xhdr.size;
1003 pos->serial = xhdr.serial1;
1878 journal_xhdr_t xhdr;
1890 CHECK(journal_read_xhdr(j, &xhdr));
1893 CHECK(maybe_fixup_xhdr(j, &xhdr, pos.serial,
1898 * Check that xhdr is consistent.
1900 if (xhdr.serial0 != pos.serial ||
1901 isc_serial_le(xhdr.serial1, xhdr.serial0))
1906 size += xhdr.size;
1907 count += xhdr.count;
1959 journal_xhdr_t xhdr;
1977 CHECK(journal_read_xhdr(j, &xhdr));
1978 if (xhdr.size == 0) {
1986 CHECK(maybe_fixup_xhdr(j, &xhdr, j->it.current_serial,
1990 if (xhdr.serial0 != j->it.current_serial ||
1991 isc_serial_le(xhdr.serial1, xhdr.serial0))
1997 xhdr.serial0);
2001 j->it.xsize = xhdr.size;
2629 journal_xhdr_t xhdr;
2633 result = journal_read_xhdr(j1, &xhdr);
2639 size = xhdr.size;
2653 * xhdr format may be wrong.
2662 CHECK(journal_read_xhdr(j1, &xhdr));
2667 CHECK(journal_read_xhdr(j1, &xhdr));
2672 size = xhdr.size;
2699 xhdr.count == serial && xhdr.serial1 == 0U &&
2700 isc_serial_gt(xhdr.serial0, xhdr.count))
2702 xhdr.serial1 = xhdr.serial0;
2703 xhdr.serial0 = xhdr.count;
2704 xhdr.count = 0;
2708 * Check that xhdr is consistent.
2710 if (xhdr.serial0 != serial ||
2711 isc_serial_le(xhdr.serial1, xhdr.serial0))
2723 CHECK(journal_write_xhdr(j2, xhdr.size, count,
2724 xhdr.serial0, xhdr.serial1));
2729 serial = xhdr.serial1;