1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.
7 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
8 * Use is subject to license terms.
17 * Each objset has its own intent log. The log header (zil_header_t)
18 * for objset N's intent log is kept in the Nth object of the SPA's
19 * intent_log objset. The log header points to a chain of log blocks,
20 * each of which contains log records (i.e., transactions) followed by
21 * a log block trailer (zil_trailer_t). The format of a log record
22 * depends on the record (or transaction) type, but all records begin
23 * with a common structure that defines the type, length, and txg.
27 * Intent log header - this on disk structure holds fields to manage
28 * the log. All fields are 64 bit to easily handle cross architectures.
30 typedef struct zil_header {
31 uint64_t zh_claim_txg; /* txg in which log blocks were claimed */
32 uint64_t zh_replay_seq; /* highest replayed sequence number */
33 blkptr_t zh_log; /* log chain */
34 uint64_t zh_claim_seq; /* highest claimed sequence number */
35 uint64_t zh_flags; /* header flags */
40 * zh_flags bit settings
42 #define ZIL_REPLAY_NEEDED 0x1 /* replay needed - internal only */
44 #endif /* _SYS_ZIL_H */