aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ag.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_ag.h')
-rw-r--r--fs/xfs/xfs_ag.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/fs/xfs/xfs_ag.h b/fs/xfs/xfs_ag.h
index f2aeedb6a579..9f4815e0c96f 100644
--- a/fs/xfs/xfs_ag.h
+++ b/fs/xfs/xfs_ag.h
@@ -63,12 +63,29 @@ typedef struct xfs_agf {
63 __be32 agf_spare0; /* spare field */ 63 __be32 agf_spare0; /* spare field */
64 __be32 agf_levels[XFS_BTNUM_AGF]; /* btree levels */ 64 __be32 agf_levels[XFS_BTNUM_AGF]; /* btree levels */
65 __be32 agf_spare1; /* spare field */ 65 __be32 agf_spare1; /* spare field */
66
66 __be32 agf_flfirst; /* first freelist block's index */ 67 __be32 agf_flfirst; /* first freelist block's index */
67 __be32 agf_fllast; /* last freelist block's index */ 68 __be32 agf_fllast; /* last freelist block's index */
68 __be32 agf_flcount; /* count of blocks in freelist */ 69 __be32 agf_flcount; /* count of blocks in freelist */
69 __be32 agf_freeblks; /* total free blocks */ 70 __be32 agf_freeblks; /* total free blocks */
71
70 __be32 agf_longest; /* longest free space */ 72 __be32 agf_longest; /* longest free space */
71 __be32 agf_btreeblks; /* # of blocks held in AGF btrees */ 73 __be32 agf_btreeblks; /* # of blocks held in AGF btrees */
74 uuid_t agf_uuid; /* uuid of filesystem */
75
76 /*
77 * reserve some contiguous space for future logged fields before we add
78 * the unlogged fields. This makes the range logging via flags and
79 * structure offsets much simpler.
80 */
81 __be64 agf_spare64[16];
82
83 /* unlogged fields, written during buffer writeback. */
84 __be64 agf_lsn; /* last write sequence */
85 __be32 agf_crc; /* crc of agf sector */
86 __be32 agf_spare2;
87
88 /* structure must be padded to 64 bit alignment */
72} xfs_agf_t; 89} xfs_agf_t;
73 90
74#define XFS_AGF_MAGICNUM 0x00000001 91#define XFS_AGF_MAGICNUM 0x00000001
@@ -83,7 +100,8 @@ typedef struct xfs_agf {
83#define XFS_AGF_FREEBLKS 0x00000200 100#define XFS_AGF_FREEBLKS 0x00000200
84#define XFS_AGF_LONGEST 0x00000400 101#define XFS_AGF_LONGEST 0x00000400
85#define XFS_AGF_BTREEBLKS 0x00000800 102#define XFS_AGF_BTREEBLKS 0x00000800
86#define XFS_AGF_NUM_BITS 12 103#define XFS_AGF_UUID 0x00001000
104#define XFS_AGF_NUM_BITS 13
87#define XFS_AGF_ALL_BITS ((1 << XFS_AGF_NUM_BITS) - 1) 105#define XFS_AGF_ALL_BITS ((1 << XFS_AGF_NUM_BITS) - 1)
88 106
89#define XFS_AGF_FLAGS \ 107#define XFS_AGF_FLAGS \
@@ -98,7 +116,8 @@ typedef struct xfs_agf {
98 { XFS_AGF_FLCOUNT, "FLCOUNT" }, \ 116 { XFS_AGF_FLCOUNT, "FLCOUNT" }, \
99 { XFS_AGF_FREEBLKS, "FREEBLKS" }, \ 117 { XFS_AGF_FREEBLKS, "FREEBLKS" }, \
100 { XFS_AGF_LONGEST, "LONGEST" }, \ 118 { XFS_AGF_LONGEST, "LONGEST" }, \
101 { XFS_AGF_BTREEBLKS, "BTREEBLKS" } 119 { XFS_AGF_BTREEBLKS, "BTREEBLKS" }, \
120 { XFS_AGF_UUID, "UUID" }
102 121
103/* disk block (xfs_daddr_t) in the AG */ 122/* disk block (xfs_daddr_t) in the AG */
104#define XFS_AGF_DADDR(mp) ((xfs_daddr_t)(1 << (mp)->m_sectbb_log)) 123#define XFS_AGF_DADDR(mp) ((xfs_daddr_t)(1 << (mp)->m_sectbb_log))