diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-05-28 12:22:45 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-06-04 14:35:38 -0700 |
commit | 8134e1643a1a6af82b48f942b70fe07c8ef25c57 (patch) | |
tree | f9ef8f3430bb037e7411530f0e1778ea977bf4c1 | |
parent | f2c7c76c5d0a443053e94adb9f0918fa2fb85c3a (diff) |
xfs: inode btree scrubber should calculate im_boffset correctlyxfs-5.2-fixes_2019-06-04
The im_boffset field is in units of bytes, whereas XFS_INO_OFFSET
returns a value in units of inodes. Convert the units so that scrub on
a 64k-block filesystem works correctly.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-rw-r--r-- | fs/xfs/scrub/ialloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/scrub/ialloc.c b/fs/xfs/scrub/ialloc.c index 693eb51f5efb..9b47117180cb 100644 --- a/fs/xfs/scrub/ialloc.c +++ b/fs/xfs/scrub/ialloc.c @@ -252,7 +252,8 @@ xchk_iallocbt_check_cluster( ir_holemask = (irec->ir_holemask & cluster_mask); imap.im_blkno = XFS_AGB_TO_DADDR(mp, agno, agbno); imap.im_len = XFS_FSB_TO_BB(mp, mp->m_blocks_per_cluster); - imap.im_boffset = XFS_INO_TO_OFFSET(mp, irec->ir_startino); + imap.im_boffset = XFS_INO_TO_OFFSET(mp, irec->ir_startino) << + mp->m_sb.sb_inodelog; if (imap.im_boffset != 0 && cluster_base != 0) { ASSERT(imap.im_boffset == 0 || cluster_base == 0); |