diff options
author | Christoph Hellwig <hch@lst.de> | 2008-11-27 22:23:37 -0500 |
---|---|---|
committer | Niv Sardi <xaiki@sgi.com> | 2008-11-30 19:37:15 -0500 |
commit | 5e1be0fb1a3950597aeda448698e85b0595a2e92 (patch) | |
tree | e9cb423d6f253b689a9e0cfb4a1d429de37959cd /fs/xfs/xfs_ag.h | |
parent | 26c5295135d10fc90cbf160adfda392d91f58279 (diff) |
[XFS] 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.
(First sent on Juli 23rd)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_ag.h')
-rw-r--r-- | fs/xfs/xfs_ag.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_ag.h b/fs/xfs/xfs_ag.h index 2bfd86329141..f4a315390c61 100644 --- a/fs/xfs/xfs_ag.h +++ b/fs/xfs/xfs_ag.h | |||
@@ -142,6 +142,9 @@ typedef struct xfs_agi { | |||
142 | #define XFS_AGI_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGI_DADDR(mp)) | 142 | #define XFS_AGI_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGI_DADDR(mp)) |
143 | #define XFS_BUF_TO_AGI(bp) ((xfs_agi_t *)XFS_BUF_PTR(bp)) | 143 | #define XFS_BUF_TO_AGI(bp) ((xfs_agi_t *)XFS_BUF_PTR(bp)) |
144 | 144 | ||
145 | extern int xfs_read_agi(struct xfs_mount *mp, struct xfs_trans *tp, | ||
146 | xfs_agnumber_t agno, struct xfs_buf **bpp); | ||
147 | |||
145 | /* | 148 | /* |
146 | * The third a.g. block contains the a.g. freelist, an array | 149 | * The third a.g. block contains the a.g. freelist, an array |
147 | * of block pointers to blocks owned by the allocation btree code. | 150 | * of block pointers to blocks owned by the allocation btree code. |