diff options
author | Dave Chinner <dchinner@redhat.com> | 2014-06-06 01:15:59 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-06-06 01:15:59 -0400 |
commit | 8f66193c89f0b0259db6b27b4df3deb828c294f9 (patch) | |
tree | 333c24e2c4d901d044e5b2c3c820cb680919f73c /fs/xfs/xfs_dir2_readdir.c | |
parent | d6cf13051f31bf1a54b65643d0e578b3ca2f0692 (diff) |
xfs: convert m_dirblksize to xfs_da_geometry
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_dir2_readdir.c')
-rw-r--r-- | fs/xfs/xfs_dir2_readdir.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/xfs/xfs_dir2_readdir.c b/fs/xfs/xfs_dir2_readdir.c index 8cb5340071e8..fa393d5c2a14 100644 --- a/fs/xfs/xfs_dir2_readdir.c +++ b/fs/xfs/xfs_dir2_readdir.c | |||
@@ -216,7 +216,7 @@ xfs_dir2_block_getdents( | |||
216 | /* | 216 | /* |
217 | * Set up values for the loop. | 217 | * Set up values for the loop. |
218 | */ | 218 | */ |
219 | btp = xfs_dir2_block_tail_p(mp, hdr); | 219 | btp = xfs_dir2_block_tail_p(geo, hdr); |
220 | ptr = (char *)dp->d_ops->data_entry_p(hdr); | 220 | ptr = (char *)dp->d_ops->data_entry_p(hdr); |
221 | endptr = (char *)xfs_dir2_block_leaf_p(btp); | 221 | endptr = (char *)xfs_dir2_block_leaf_p(btp); |
222 | 222 | ||
@@ -338,7 +338,7 @@ xfs_dir2_leaf_readbuf( | |||
338 | /* | 338 | /* |
339 | * Recalculate the readahead blocks wanted. | 339 | * Recalculate the readahead blocks wanted. |
340 | */ | 340 | */ |
341 | mip->ra_want = howmany(bufsize + mp->m_dirblksize, | 341 | mip->ra_want = howmany(bufsize + geo->blksize, |
342 | mp->m_sb.sb_blocksize) - 1; | 342 | mp->m_sb.sb_blocksize) - 1; |
343 | ASSERT(mip->ra_want >= 0); | 343 | ASSERT(mip->ra_want >= 0); |
344 | 344 | ||
@@ -526,8 +526,7 @@ xfs_dir2_leaf_getdents( | |||
526 | * buffer size, the directory block size, and the filesystem | 526 | * buffer size, the directory block size, and the filesystem |
527 | * block size. | 527 | * block size. |
528 | */ | 528 | */ |
529 | length = howmany(bufsize + mp->m_dirblksize, | 529 | length = howmany(bufsize + geo->blksize, mp->m_sb.sb_blocksize); |
530 | mp->m_sb.sb_blocksize); | ||
531 | map_info = kmem_zalloc(offsetof(struct xfs_dir2_leaf_map_info, map) + | 530 | map_info = kmem_zalloc(offsetof(struct xfs_dir2_leaf_map_info, map) + |
532 | (length * sizeof(struct xfs_bmbt_irec)), | 531 | (length * sizeof(struct xfs_bmbt_irec)), |
533 | KM_SLEEP | KM_NOFS); | 532 | KM_SLEEP | KM_NOFS); |
@@ -557,7 +556,7 @@ xfs_dir2_leaf_getdents( | |||
557 | * If we have no buffer, or we're off the end of the | 556 | * If we have no buffer, or we're off the end of the |
558 | * current buffer, need to get another one. | 557 | * current buffer, need to get another one. |
559 | */ | 558 | */ |
560 | if (!bp || ptr >= (char *)bp->b_addr + mp->m_dirblksize) { | 559 | if (!bp || ptr >= (char *)bp->b_addr + geo->blksize) { |
561 | 560 | ||
562 | error = xfs_dir2_leaf_readbuf(dp, bufsize, map_info, | 561 | error = xfs_dir2_leaf_readbuf(dp, bufsize, map_info, |
563 | &curoff, &bp); | 562 | &curoff, &bp); |
@@ -618,7 +617,7 @@ xfs_dir2_leaf_getdents( | |||
618 | xfs_dir2_db_off_to_byte(geo, | 617 | xfs_dir2_db_off_to_byte(geo, |
619 | xfs_dir2_byte_to_db(geo, curoff), | 618 | xfs_dir2_byte_to_db(geo, curoff), |
620 | (char *)ptr - (char *)hdr); | 619 | (char *)ptr - (char *)hdr); |
621 | if (ptr >= (char *)hdr + mp->m_dirblksize) { | 620 | if (ptr >= (char *)hdr + geo->blksize) { |
622 | continue; | 621 | continue; |
623 | } | 622 | } |
624 | } | 623 | } |