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.h36
1 files changed, 22 insertions, 14 deletions
diff --git a/fs/xfs/xfs_ag.h b/fs/xfs/xfs_ag.h
index 0fdd4109c624..6e247a99f5db 100644
--- a/fs/xfs/xfs_ag.h
+++ b/fs/xfs/xfs_ag.h
@@ -160,30 +160,38 @@ typedef struct xfs_agi {
160 * still being referenced. 160 * still being referenced.
161 */ 161 */
162 __be32 agi_unlinked[XFS_AGI_UNLINKED_BUCKETS]; 162 __be32 agi_unlinked[XFS_AGI_UNLINKED_BUCKETS];
163 163 /*
164 * This marks the end of logging region 1 and start of logging region 2.
165 */
164 uuid_t agi_uuid; /* uuid of filesystem */ 166 uuid_t agi_uuid; /* uuid of filesystem */
165 __be32 agi_crc; /* crc of agi sector */ 167 __be32 agi_crc; /* crc of agi sector */
166 __be32 agi_pad32; 168 __be32 agi_pad32;
167 __be64 agi_lsn; /* last write sequence */ 169 __be64 agi_lsn; /* last write sequence */
168 170
171 __be32 agi_free_root; /* root of the free inode btree */
172 __be32 agi_free_level;/* levels in free inode btree */
173
169 /* structure must be padded to 64 bit alignment */ 174 /* structure must be padded to 64 bit alignment */
170} xfs_agi_t; 175} xfs_agi_t;
171 176
172#define XFS_AGI_CRC_OFF offsetof(struct xfs_agi, agi_crc) 177#define XFS_AGI_CRC_OFF offsetof(struct xfs_agi, agi_crc)
173 178
174#define XFS_AGI_MAGICNUM 0x00000001 179#define XFS_AGI_MAGICNUM (1 << 0)
175#define XFS_AGI_VERSIONNUM 0x00000002 180#define XFS_AGI_VERSIONNUM (1 << 1)
176#define XFS_AGI_SEQNO 0x00000004 181#define XFS_AGI_SEQNO (1 << 2)
177#define XFS_AGI_LENGTH 0x00000008 182#define XFS_AGI_LENGTH (1 << 3)
178#define XFS_AGI_COUNT 0x00000010 183#define XFS_AGI_COUNT (1 << 4)
179#define XFS_AGI_ROOT 0x00000020 184#define XFS_AGI_ROOT (1 << 5)
180#define XFS_AGI_LEVEL 0x00000040 185#define XFS_AGI_LEVEL (1 << 6)
181#define XFS_AGI_FREECOUNT 0x00000080 186#define XFS_AGI_FREECOUNT (1 << 7)
182#define XFS_AGI_NEWINO 0x00000100 187#define XFS_AGI_NEWINO (1 << 8)
183#define XFS_AGI_DIRINO 0x00000200 188#define XFS_AGI_DIRINO (1 << 9)
184#define XFS_AGI_UNLINKED 0x00000400 189#define XFS_AGI_UNLINKED (1 << 10)
185#define XFS_AGI_NUM_BITS 11 190#define XFS_AGI_NUM_BITS_R1 11 /* end of the 1st agi logging region */
186#define XFS_AGI_ALL_BITS ((1 << XFS_AGI_NUM_BITS) - 1) 191#define XFS_AGI_ALL_BITS_R1 ((1 << XFS_AGI_NUM_BITS_R1) - 1)
192#define XFS_AGI_FREE_ROOT (1 << 11)
193#define XFS_AGI_FREE_LEVEL (1 << 12)
194#define XFS_AGI_NUM_BITS_R2 13
187 195
188/* disk block (xfs_daddr_t) in the AG */ 196/* disk block (xfs_daddr_t) in the AG */
189#define XFS_AGI_DADDR(mp) ((xfs_daddr_t)(2 << (mp)->m_sectbb_log)) 197#define XFS_AGI_DADDR(mp) ((xfs_daddr_t)(2 << (mp)->m_sectbb_log))