diff options
author | Dave Chinner <dchinner@redhat.com> | 2014-06-06 15:08:18 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-06-06 15:08:18 +1000 |
commit | 30028030b14d083123c88e3ab45990a8c375abf1 (patch) | |
tree | c6787bd71e8b29f7acf675500a899e4154e0b951 /fs/xfs/xfs_dir2_priv.h | |
parent | 2998ab1d450a526a9a3a6292f91239b4fc209db0 (diff) | |
download | linux-30028030b14d083123c88e3ab45990a8c375abf1.tar.gz linux-30028030b14d083123c88e3ab45990a8c375abf1.tar.bz2 linux-30028030b14d083123c88e3ab45990a8c375abf1.zip |
xfs: convert directory db 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_priv.h')
-rw-r--r-- | fs/xfs/xfs_dir2_priv.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/fs/xfs/xfs_dir2_priv.h b/fs/xfs/xfs_dir2_priv.h index 18e3086bf933..071b685abcbb 100644 --- a/fs/xfs/xfs_dir2_priv.h +++ b/fs/xfs/xfs_dir2_priv.h @@ -48,19 +48,18 @@ xfs_dir2_byte_to_dataptr(xfs_dir2_off_t by) * Convert byte in space to (DB) block */ static inline xfs_dir2_db_t -xfs_dir2_byte_to_db(struct xfs_mount *mp, xfs_dir2_off_t by) +xfs_dir2_byte_to_db(struct xfs_da_geometry *geo, xfs_dir2_off_t by) { - return (xfs_dir2_db_t) - (by >> (mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog)); + return (xfs_dir2_db_t)(by >> geo->blklog); } /* * Convert dataptr to a block number */ static inline xfs_dir2_db_t -xfs_dir2_dataptr_to_db(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) +xfs_dir2_dataptr_to_db(struct xfs_da_geometry *geo, xfs_dir2_dataptr_t dp) { - return xfs_dir2_byte_to_db(mp, xfs_dir2_dataptr_to_byte(dp)); + return xfs_dir2_byte_to_db(geo, xfs_dir2_dataptr_to_byte(dp)); } /* @@ -76,9 +75,9 @@ xfs_dir2_byte_to_off(struct xfs_da_geometry *geo, xfs_dir2_off_t by) * Convert dataptr to a byte offset in a block */ static inline xfs_dir2_data_aoff_t -xfs_dir2_dataptr_to_off(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) +xfs_dir2_dataptr_to_off(struct xfs_da_geometry *geo, xfs_dir2_dataptr_t dp) { - return xfs_dir2_byte_to_off(mp->m_dir_geo, xfs_dir2_dataptr_to_byte(dp)); + return xfs_dir2_byte_to_off(geo, xfs_dir2_dataptr_to_byte(dp)); } /* @@ -104,20 +103,19 @@ xfs_dir2_db_to_da(struct xfs_da_geometry *geo, xfs_dir2_db_t db) * Convert byte in space to (DA) block */ static inline xfs_dablk_t -xfs_dir2_byte_to_da(struct xfs_mount *mp, xfs_dir2_off_t by) +xfs_dir2_byte_to_da(struct xfs_da_geometry *geo, xfs_dir2_off_t by) { - return xfs_dir2_db_to_da(mp->m_dir_geo, xfs_dir2_byte_to_db(mp, by)); + return xfs_dir2_db_to_da(geo, xfs_dir2_byte_to_db(geo, by)); } /* * Convert block and offset to dataptr */ static inline xfs_dir2_dataptr_t -xfs_dir2_db_off_to_dataptr(struct xfs_mount *mp, xfs_dir2_db_t db, +xfs_dir2_db_off_to_dataptr(struct xfs_da_geometry *geo, xfs_dir2_db_t db, xfs_dir2_data_aoff_t o) { - return xfs_dir2_byte_to_dataptr( - xfs_dir2_db_off_to_byte(mp->m_dir_geo, db, o)); + return xfs_dir2_byte_to_dataptr(xfs_dir2_db_off_to_byte(geo, db, o)); } /* |