* [PATCH] xfs: inode btree scrubber should calculate im_boffset correctly
@ 2019-05-29 0:25 Darrick J. Wong
2019-06-03 12:32 ` Brian Foster
0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2019-05-29 0:25 UTC (permalink / raw)
To: xfs; +Cc: Brian Foster
From: Darrick J. Wong <darrick.wong@oracle.com>
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>
---
fs/xfs/scrub/ialloc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfs: inode btree scrubber should calculate im_boffset correctly
2019-05-29 0:25 [PATCH] xfs: inode btree scrubber should calculate im_boffset correctly Darrick J. Wong
@ 2019-06-03 12:32 ` Brian Foster
0 siblings, 0 replies; 2+ messages in thread
From: Brian Foster @ 2019-06-03 12:32 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: xfs
On Tue, May 28, 2019 at 05:25:45PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> 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>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/scrub/ialloc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> 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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-03 12:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 0:25 [PATCH] xfs: inode btree scrubber should calculate im_boffset correctly Darrick J. Wong
2019-06-03 12:32 ` Brian Foster
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.