diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-10-30 02:14:34 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@sgi.com> | 2008-10-30 02:14:34 -0400 |
commit | 7cc95a821df8f09a5d37a923cf8c3a7c3ee00c29 (patch) | |
tree | 8fde02d4c9a52b7da7b3e961f8a23cf4b493a4a4 /fs/xfs/xfs_fsops.c | |
parent | 136341b41ad4883bd668120f727a52c42331fe8a (diff) |
[XFS] Always use struct xfs_btree_block instead of short / longform
structures.
Always use the generic xfs_btree_block type instead of the short / long
structures. Add XFS_BTREE_SBLOCK_LEN / XFS_BTREE_LBLOCK_LEN defines for
the length of a short / long form block. The rationale for this is that we
will grow more btree block header variants to support CRCs and other RAS
information, and always accessing them through the same datatype with
unions for the short / long form pointers makes implementing this much
easier.
SGI-PV: 988146
SGI-Modid: xfs-linux-melb:xfs-kern:32300a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_fsops.c')
-rw-r--r-- | fs/xfs/xfs_fsops.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index 8ce72aba027f..f1d0585041b9 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c | |||
@@ -126,7 +126,7 @@ xfs_growfs_data_private( | |||
126 | xfs_extlen_t agsize; | 126 | xfs_extlen_t agsize; |
127 | xfs_extlen_t tmpsize; | 127 | xfs_extlen_t tmpsize; |
128 | xfs_alloc_rec_t *arec; | 128 | xfs_alloc_rec_t *arec; |
129 | xfs_btree_sblock_t *block; | 129 | struct xfs_btree_block *block; |
130 | xfs_buf_t *bp; | 130 | xfs_buf_t *bp; |
131 | int bucket; | 131 | int bucket; |
132 | int dpct; | 132 | int dpct; |
@@ -251,13 +251,13 @@ xfs_growfs_data_private( | |||
251 | bp = xfs_buf_get(mp->m_ddev_targp, | 251 | bp = xfs_buf_get(mp->m_ddev_targp, |
252 | XFS_AGB_TO_DADDR(mp, agno, XFS_BNO_BLOCK(mp)), | 252 | XFS_AGB_TO_DADDR(mp, agno, XFS_BNO_BLOCK(mp)), |
253 | BTOBB(mp->m_sb.sb_blocksize), 0); | 253 | BTOBB(mp->m_sb.sb_blocksize), 0); |
254 | block = XFS_BUF_TO_SBLOCK(bp); | 254 | block = XFS_BUF_TO_BLOCK(bp); |
255 | memset(block, 0, mp->m_sb.sb_blocksize); | 255 | memset(block, 0, mp->m_sb.sb_blocksize); |
256 | block->bb_magic = cpu_to_be32(XFS_ABTB_MAGIC); | 256 | block->bb_magic = cpu_to_be32(XFS_ABTB_MAGIC); |
257 | block->bb_level = 0; | 257 | block->bb_level = 0; |
258 | block->bb_numrecs = cpu_to_be16(1); | 258 | block->bb_numrecs = cpu_to_be16(1); |
259 | block->bb_leftsib = cpu_to_be32(NULLAGBLOCK); | 259 | block->bb_u.s.bb_leftsib = cpu_to_be32(NULLAGBLOCK); |
260 | block->bb_rightsib = cpu_to_be32(NULLAGBLOCK); | 260 | block->bb_u.s.bb_rightsib = cpu_to_be32(NULLAGBLOCK); |
261 | arec = XFS_ALLOC_REC_ADDR(mp, block, 1); | 261 | arec = XFS_ALLOC_REC_ADDR(mp, block, 1); |
262 | arec->ar_startblock = cpu_to_be32(XFS_PREALLOC_BLOCKS(mp)); | 262 | arec->ar_startblock = cpu_to_be32(XFS_PREALLOC_BLOCKS(mp)); |
263 | arec->ar_blockcount = cpu_to_be32( | 263 | arec->ar_blockcount = cpu_to_be32( |
@@ -272,13 +272,13 @@ xfs_growfs_data_private( | |||
272 | bp = xfs_buf_get(mp->m_ddev_targp, | 272 | bp = xfs_buf_get(mp->m_ddev_targp, |
273 | XFS_AGB_TO_DADDR(mp, agno, XFS_CNT_BLOCK(mp)), | 273 | XFS_AGB_TO_DADDR(mp, agno, XFS_CNT_BLOCK(mp)), |
274 | BTOBB(mp->m_sb.sb_blocksize), 0); | 274 | BTOBB(mp->m_sb.sb_blocksize), 0); |
275 | block = XFS_BUF_TO_SBLOCK(bp); | 275 | block = XFS_BUF_TO_BLOCK(bp); |
276 | memset(block, 0, mp->m_sb.sb_blocksize); | 276 | memset(block, 0, mp->m_sb.sb_blocksize); |
277 | block->bb_magic = cpu_to_be32(XFS_ABTC_MAGIC); | 277 | block->bb_magic = cpu_to_be32(XFS_ABTC_MAGIC); |
278 | block->bb_level = 0; | 278 | block->bb_level = 0; |
279 | block->bb_numrecs = cpu_to_be16(1); | 279 | block->bb_numrecs = cpu_to_be16(1); |
280 | block->bb_leftsib = cpu_to_be32(NULLAGBLOCK); | 280 | block->bb_u.s.bb_leftsib = cpu_to_be32(NULLAGBLOCK); |
281 | block->bb_rightsib = cpu_to_be32(NULLAGBLOCK); | 281 | block->bb_u.s.bb_rightsib = cpu_to_be32(NULLAGBLOCK); |
282 | arec = XFS_ALLOC_REC_ADDR(mp, block, 1); | 282 | arec = XFS_ALLOC_REC_ADDR(mp, block, 1); |
283 | arec->ar_startblock = cpu_to_be32(XFS_PREALLOC_BLOCKS(mp)); | 283 | arec->ar_startblock = cpu_to_be32(XFS_PREALLOC_BLOCKS(mp)); |
284 | arec->ar_blockcount = cpu_to_be32( | 284 | arec->ar_blockcount = cpu_to_be32( |
@@ -294,13 +294,13 @@ xfs_growfs_data_private( | |||
294 | bp = xfs_buf_get(mp->m_ddev_targp, | 294 | bp = xfs_buf_get(mp->m_ddev_targp, |
295 | XFS_AGB_TO_DADDR(mp, agno, XFS_IBT_BLOCK(mp)), | 295 | XFS_AGB_TO_DADDR(mp, agno, XFS_IBT_BLOCK(mp)), |
296 | BTOBB(mp->m_sb.sb_blocksize), 0); | 296 | BTOBB(mp->m_sb.sb_blocksize), 0); |
297 | block = XFS_BUF_TO_SBLOCK(bp); | 297 | block = XFS_BUF_TO_BLOCK(bp); |
298 | memset(block, 0, mp->m_sb.sb_blocksize); | 298 | memset(block, 0, mp->m_sb.sb_blocksize); |
299 | block->bb_magic = cpu_to_be32(XFS_IBT_MAGIC); | 299 | block->bb_magic = cpu_to_be32(XFS_IBT_MAGIC); |
300 | block->bb_level = 0; | 300 | block->bb_level = 0; |
301 | block->bb_numrecs = 0; | 301 | block->bb_numrecs = 0; |
302 | block->bb_leftsib = cpu_to_be32(NULLAGBLOCK); | 302 | block->bb_u.s.bb_leftsib = cpu_to_be32(NULLAGBLOCK); |
303 | block->bb_rightsib = cpu_to_be32(NULLAGBLOCK); | 303 | block->bb_u.s.bb_rightsib = cpu_to_be32(NULLAGBLOCK); |
304 | error = xfs_bwrite(mp, bp); | 304 | error = xfs_bwrite(mp, bp); |
305 | if (error) { | 305 | if (error) { |
306 | goto error0; | 306 | goto error0; |