From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Carlos Maiolino <cem@kernel.org>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs: use bt_nr_blocks in xfs_dax_translate_range
Date: Mon, 18 Aug 2025 13:49:29 -0700 [thread overview]
Message-ID: <20250818204929.GZ7965@frogsfrogsfrogs> (raw)
In-Reply-To: <20250818051155.1486253-3-hch@lst.de>
On Mon, Aug 18, 2025 at 07:11:24AM +0200, Christoph Hellwig wrote:
> Only ranges inside the file system can be translated, and the file system
> can be smaller than the containing device.
>
> Fixes: f4ed93037966 ("xfs: don't shut down the filesystem for media failures beyond end of log")
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> fs/xfs/xfs_notify_failure.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_notify_failure.c b/fs/xfs/xfs_notify_failure.c
> index fbeddcac4792..3726caa38375 100644
> --- a/fs/xfs/xfs_notify_failure.c
> +++ b/fs/xfs/xfs_notify_failure.c
> @@ -165,7 +165,7 @@ xfs_dax_translate_range(
> uint64_t *bblen)
> {
> u64 dev_start = btp->bt_dax_part_off;
> - u64 dev_len = bdev_nr_bytes(btp->bt_bdev);
> + u64 dev_len = BBTOB(btp->bt_nr_blocks);
Yeah, dev_len is used to filter out ranges beyond what the filesystem
cares about, so
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> u64 dev_end = dev_start + dev_len - 1;
>
> /* Notify failure on the whole device. */
> --
> 2.47.2
>
>
next prev parent reply other threads:[~2025-08-18 20:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 5:11 store the buftarg size in the buftarg Christoph Hellwig
2025-08-18 5:11 ` [PATCH 1/2] xfs: track the number of blocks in each buftarg Christoph Hellwig
2025-08-18 20:48 ` Darrick J. Wong
2025-08-19 8:06 ` Christoph Hellwig
2025-08-18 5:11 ` [PATCH 2/2] xfs: use bt_nr_blocks in xfs_dax_translate_range Christoph Hellwig
2025-08-18 20:49 ` Darrick J. Wong [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-08-25 11:19 store the buftarg size in the buftarg v2 Christoph Hellwig
2025-08-25 11:19 ` [PATCH 2/2] xfs: use bt_nr_blocks in xfs_dax_translate_range Christoph Hellwig
2025-09-16 13:52 store the buftarg size in the buftarg v3 Christoph Hellwig
2025-09-16 13:52 ` [PATCH 2/2] xfs: use bt_nr_blocks in xfs_dax_translate_range Christoph Hellwig
2025-09-17 21:29 ` Dave Chinner
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=20250818204929.GZ7965@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=cem@kernel.org \
--cc=hch@lst.de \
--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