Skip to contentSkip to conversation

factor out xfs_read_agi helper

PATCH New Christoph Hellwig 1 participant 1 message Jul 23, 2008 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 factor out xfs_read_agi helper

Add a helper to read the AGI header and perform basic verification. Based on hunks from a larger patch from Dave Chinner.

fs/xfs/xfs_ag.h +3 -0
Index: linux-2.6-xfs/fs/xfs/xfs_ag.h
===================================================================
@@ -142,6 +142,9 @@ typedef struct xfs_agi {
 #define	XFS_AGI_BLOCK(mp)	XFS_HDR_BLOCK(mp, XFS_AGI_DADDR(mp))
 #define	XFS_BUF_TO_AGI(bp)	((xfs_agi_t *)XFS_BUF_PTR(bp))
 
+extern int xfs_read_agi(struct xfs_mount *mp, struct xfs_trans *tp,
+				xfs_agnumber_t agno, struct xfs_buf **bpp);
+
 /*
  * The third a.g. block contains the a.g. freelist, an array
  * of block pointers to blocks owned by the allocation btree code.
fs/xfs/xfs_ialloc.c +63 -38

133 lines not on this page · raw message

fs/xfs/xfs_inode.c +5 -47

101 lines not on this page · raw message

fs/xfs/xfs_log_recover.c +40 -44

131 lines not on this page · raw message