Lines Matching defs:xhdr
489 journal_read_xhdr(dns_journal_t *j, journal_xhdr_t *xhdr) {
501 xhdr->size = decode_uint32(raw.size);
502 xhdr->count = 0;
503 xhdr->serial0 = decode_uint32(raw.serial0);
504 xhdr->serial1 = decode_uint32(raw.serial1);
505 j->curxhdr = *xhdr;
515 xhdr->size = decode_uint32(raw.size);
516 xhdr->count = decode_uint32(raw.count);
517 xhdr->serial0 = decode_uint32(raw.serial0);
518 xhdr->serial1 = decode_uint32(raw.serial1);
519 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
861 maybe_fixup_xhdr(dns_journal_t *j, journal_xhdr_t *xhdr, uint32_t serial,
869 if ((xhdr->serial0 != serial ||
870 isc_serial_le(xhdr->serial1, xhdr->serial0)))
872 if (j->xhdr_version == XHDR_VERSION1 && xhdr->serial1 == serial)
880 CHECK(journal_read_xhdr(j, xhdr));
883 xhdr->count == serial)
891 CHECK(journal_read_xhdr(j, xhdr));
912 } else if (j->xhdr_version == XHDR_VERSION2 && xhdr->count == serial &&
913 xhdr->serial1 == 0U &&
914 isc_serial_gt(xhdr->serial0, xhdr->count))
919 xhdr->serial1 = xhdr->serial0;
920 xhdr->serial0 = xhdr->count;
921 xhdr->count = 0;
948 journal_xhdr_t xhdr;
966 result = journal_read_xhdr(j, &xhdr);
972 CHECK(maybe_fixup_xhdr(j, &xhdr, pos->serial, pos->offset));
978 if (xhdr.serial0 != pos->serial ||
979 isc_serial_le(xhdr.serial1, xhdr.serial0))
984 j->filename, pos->serial, xhdr.serial0);
995 if ((isc_offset_t)(pos->offset + hdrsize + xhdr.size) < pos->offset) {
1001 pos->offset += hdrsize + xhdr.size;
1002 pos->serial = xhdr.serial1;
1877 journal_xhdr_t xhdr;
1889 CHECK(journal_read_xhdr(j, &xhdr));
1892 CHECK(maybe_fixup_xhdr(j, &xhdr, pos.serial,
1897 * Check that xhdr is consistent.
1899 if (xhdr.serial0 != pos.serial ||
1900 isc_serial_le(xhdr.serial1, xhdr.serial0))
1905 size += xhdr.size;
1906 count += xhdr.count;
1957 journal_xhdr_t xhdr;
1975 CHECK(journal_read_xhdr(j, &xhdr));
1976 if (xhdr.size == 0) {
1984 CHECK(maybe_fixup_xhdr(j, &xhdr, j->it.current_serial,
1988 if (xhdr.serial0 != j->it.current_serial ||
1989 isc_serial_le(xhdr.serial1, xhdr.serial0))
1995 xhdr.serial0);
1999 j->it.xsize = xhdr.size;
2626 journal_xhdr_t xhdr;
2630 result = journal_read_xhdr(j1, &xhdr);
2636 size = xhdr.size;
2650 * xhdr format may be wrong.
2659 CHECK(journal_read_xhdr(j1, &xhdr));
2664 CHECK(journal_read_xhdr(j1, &xhdr));
2669 size = xhdr.size;
2696 xhdr.count == serial && xhdr.serial1 == 0U &&
2697 isc_serial_gt(xhdr.serial0, xhdr.count))
2699 xhdr.serial1 = xhdr.serial0;
2700 xhdr.serial0 = xhdr.count;
2701 xhdr.count = 0;
2705 * Check that xhdr is consistent.
2707 if (xhdr.serial0 != serial ||
2708 isc_serial_le(xhdr.serial1, xhdr.serial0))
2720 CHECK(journal_write_xhdr(j2, xhdr.size, count,
2721 xhdr.serial0, xhdr.serial1));
2726 serial = xhdr.serial1;