xfs: convert dir byte/off 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>
This commit is contained in:

committed by
Dave Chinner

parent
8c44a28561
commit
9b3b5522d3
@@ -560,7 +560,8 @@ xfs_dir2_leaf_getdents(
|
||||
/*
|
||||
* Having done a read, we need to set a new offset.
|
||||
*/
|
||||
newoff = xfs_dir2_db_off_to_byte(mp, map_info->curdb, 0);
|
||||
newoff = xfs_dir2_db_off_to_byte(mp->m_dir_geo,
|
||||
map_info->curdb, 0);
|
||||
/*
|
||||
* Start of the current block.
|
||||
*/
|
||||
@@ -578,7 +579,7 @@ xfs_dir2_leaf_getdents(
|
||||
* Find our position in the block.
|
||||
*/
|
||||
ptr = (char *)dp->d_ops->data_entry_p(hdr);
|
||||
byteoff = xfs_dir2_byte_to_off(mp, curoff);
|
||||
byteoff = xfs_dir2_byte_to_off(mp->m_dir_geo, curoff);
|
||||
/*
|
||||
* Skip past the header.
|
||||
*/
|
||||
@@ -607,7 +608,7 @@ xfs_dir2_leaf_getdents(
|
||||
* Now set our real offset.
|
||||
*/
|
||||
curoff =
|
||||
xfs_dir2_db_off_to_byte(mp,
|
||||
xfs_dir2_db_off_to_byte(mp->m_dir_geo,
|
||||
xfs_dir2_byte_to_db(mp, curoff),
|
||||
(char *)ptr - (char *)hdr);
|
||||
if (ptr >= (char *)hdr + mp->m_dirblksize) {
|
||||
|
Reference in New Issue
Block a user