From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/3] xfs: fix off-by-one error when the last rt extent is in use
Date: Thu, 12 Aug 2021 09:36:52 +0100 [thread overview]
Message-ID: <YRTdpEM4/pjeODwG@infradead.org> (raw)
In-Reply-To: <162872992772.1220643.10308054638747493338.stgit@magnolia>
On Wed, Aug 11, 2021 at 05:58:47PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> The fsmap implementation for realtime devices uses the gap between
> info->next_daddr and a free rtextent reported by xfs_rtalloc_query_range
> to feed userspace fsmap records with an "unknown" owner. We use this
> trick to report to userspace when the last rtextent in the filesystem is
> in use by synthesizing a null rmap record starting at the next block
> after the query range.
>
> Unfortunately, there's a minor accounting bug in the way that we
> construct the null rmap record. Originally, ahigh.ar_startext contains
> the last rtextent for which the user wants records. It's entirely
> possible that number is beyond the end of the rt volume, so the location
> synthesized rmap record /must/ be constrained to the minimum of the high
> key and the number of extents in the rt volume.
Looks good, although the change is a little hard to follow due to the
big amount of cleanups vs the tiny actual bug fix.
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2021-08-12 8:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 0:58 [PATCHSET 0/3] xfs: fix various bugs in fsmap Darrick J. Wong
2021-08-12 0:58 ` [PATCH 1/3] xfs: make xfs_rtalloc_query_range input parameters const Darrick J. Wong
2021-08-12 8:30 ` Christoph Hellwig
2021-08-12 15:07 ` Darrick J. Wong
2021-08-13 9:56 ` Chandan Babu R
2021-08-12 0:58 ` [PATCH 2/3] xfs: fix off-by-one error when the last rt extent is in use Darrick J. Wong
2021-08-12 8:36 ` Christoph Hellwig [this message]
2021-08-12 16:24 ` Darrick J. Wong
2021-08-13 10:50 ` Chandan Babu R
2021-08-13 16:16 ` Darrick J. Wong
2021-08-12 0:58 ` [PATCH 3/3] xfs: make fsmap backend function key parameters const Darrick J. Wong
2021-08-12 8:40 ` Christoph Hellwig
2021-08-13 11:03 ` Chandan Babu R
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=YRTdpEM4/pjeODwG@infradead.org \
--to=hch@infradead.org \
--cc=djwong@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).