From: Brian Foster <bfoster@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: inode btree scrubber should calculate im_boffset correctly
Date: Mon, 3 Jun 2019 08:32:17 -0400 [thread overview]
Message-ID: <20190603123216.GA38223@bfoster> (raw)
In-Reply-To: <20190529002545.GB5231@magnolia>
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);
prev parent reply other threads:[~2019-06-03 12:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190603123216.GA38223@bfoster \
--to=bfoster@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox