diff options
author | Dave Chinner <dchinner@redhat.com> | 2014-06-06 01:07:53 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-06-06 01:07:53 -0400 |
commit | 2998ab1d450a526a9a3a6292f91239b4fc209db0 (patch) | |
tree | 93a2760e30b8801445d624ae776f2c0fb246ae72 /fs/xfs/xfs_dir2_leaf.c | |
parent | 9b3b5522d3f55215ce51c87b0467926c57a6f182 (diff) |
xfs: convert directory dablk conversion 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_leaf.c')
-rw-r--r-- | fs/xfs/xfs_dir2_leaf.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c index dc4ef19365b8..046ba4a09eaa 100644 --- a/fs/xfs/xfs_dir2_leaf.c +++ b/fs/xfs/xfs_dir2_leaf.c | |||
@@ -350,8 +350,8 @@ xfs_dir3_leaf_get_buf( | |||
350 | ASSERT(bno >= xfs_dir2_byte_to_db(mp, XFS_DIR2_LEAF_OFFSET) && | 350 | ASSERT(bno >= xfs_dir2_byte_to_db(mp, XFS_DIR2_LEAF_OFFSET) && |
351 | bno < xfs_dir2_byte_to_db(mp, XFS_DIR2_FREE_OFFSET)); | 351 | bno < xfs_dir2_byte_to_db(mp, XFS_DIR2_FREE_OFFSET)); |
352 | 352 | ||
353 | error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(mp, bno), -1, &bp, | 353 | error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(args->geo, bno), |
354 | XFS_DATA_FORK); | 354 | -1, &bp, XFS_DATA_FORK); |
355 | if (error) | 355 | if (error) |
356 | return error; | 356 | return error; |
357 | 357 | ||
@@ -403,7 +403,7 @@ xfs_dir2_block_to_leaf( | |||
403 | if ((error = xfs_da_grow_inode(args, &blkno))) { | 403 | if ((error = xfs_da_grow_inode(args, &blkno))) { |
404 | return error; | 404 | return error; |
405 | } | 405 | } |
406 | ldb = xfs_dir2_da_to_db(mp, blkno); | 406 | ldb = xfs_dir2_da_to_db(args->geo, blkno); |
407 | ASSERT(ldb == xfs_dir2_byte_to_db(mp, XFS_DIR2_LEAF_OFFSET)); | 407 | ASSERT(ldb == xfs_dir2_byte_to_db(mp, XFS_DIR2_LEAF_OFFSET)); |
408 | /* | 408 | /* |
409 | * Initialize the leaf block, get a buffer for it. | 409 | * Initialize the leaf block, get a buffer for it. |
@@ -828,8 +828,8 @@ xfs_dir2_leaf_addname( | |||
828 | * Just read that one in. | 828 | * Just read that one in. |
829 | */ | 829 | */ |
830 | error = xfs_dir3_data_read(tp, dp, | 830 | error = xfs_dir3_data_read(tp, dp, |
831 | xfs_dir2_db_to_da(mp, use_block), | 831 | xfs_dir2_db_to_da(args->geo, use_block), |
832 | -1, &dbp); | 832 | -1, &dbp); |
833 | if (error) { | 833 | if (error) { |
834 | xfs_trans_brelse(tp, lbp); | 834 | xfs_trans_brelse(tp, lbp); |
835 | return error; | 835 | return error; |
@@ -1269,8 +1269,8 @@ xfs_dir2_leaf_lookup_int( | |||
1269 | if (dbp) | 1269 | if (dbp) |
1270 | xfs_trans_brelse(tp, dbp); | 1270 | xfs_trans_brelse(tp, dbp); |
1271 | error = xfs_dir3_data_read(tp, dp, | 1271 | error = xfs_dir3_data_read(tp, dp, |
1272 | xfs_dir2_db_to_da(mp, newdb), | 1272 | xfs_dir2_db_to_da(args->geo, newdb), |
1273 | -1, &dbp); | 1273 | -1, &dbp); |
1274 | if (error) { | 1274 | if (error) { |
1275 | xfs_trans_brelse(tp, lbp); | 1275 | xfs_trans_brelse(tp, lbp); |
1276 | return error; | 1276 | return error; |
@@ -1310,8 +1310,8 @@ xfs_dir2_leaf_lookup_int( | |||
1310 | if (cidb != curdb) { | 1310 | if (cidb != curdb) { |
1311 | xfs_trans_brelse(tp, dbp); | 1311 | xfs_trans_brelse(tp, dbp); |
1312 | error = xfs_dir3_data_read(tp, dp, | 1312 | error = xfs_dir3_data_read(tp, dp, |
1313 | xfs_dir2_db_to_da(mp, cidb), | 1313 | xfs_dir2_db_to_da(args->geo, cidb), |
1314 | -1, &dbp); | 1314 | -1, &dbp); |
1315 | if (error) { | 1315 | if (error) { |
1316 | xfs_trans_brelse(tp, lbp); | 1316 | xfs_trans_brelse(tp, lbp); |
1317 | return error; | 1317 | return error; |
@@ -1609,7 +1609,8 @@ xfs_dir2_leaf_trim_data( | |||
1609 | /* | 1609 | /* |
1610 | * Read the offending data block. We need its buffer. | 1610 | * Read the offending data block. We need its buffer. |
1611 | */ | 1611 | */ |
1612 | error = xfs_dir3_data_read(tp, dp, xfs_dir2_db_to_da(mp, db), -1, &dbp); | 1612 | error = xfs_dir3_data_read(tp, dp, xfs_dir2_db_to_da(args->geo, db), |
1613 | -1, &dbp); | ||
1613 | if (error) | 1614 | if (error) |
1614 | return error; | 1615 | return error; |
1615 | 1616 | ||