From: Boris Burkov <boris@bur.io>
To: Mark Harmstone <mark@harmstone.com>
Cc: linux-btrfs@vger.kernel.org, wqu@suse.com, Chris Mason <clm@fb.com>
Subject: Re: [PATCH] btrfs: fix incorrect error message in check_dev_extent_item()
Date: Tue, 17 Feb 2026 09:04:39 -0800 [thread overview]
Message-ID: <aZSfpwbIsDs1zznG@devvm12410.ftw0.facebook.com> (raw)
In-Reply-To: <20260217103419.19609-1-mark@harmstone.com>
On Tue, Feb 17, 2026 at 10:34:08AM +0000, Mark Harmstone wrote:
> Fix the error message in check_dev_extent_item(), when an overlapping
> stripe is encountered. For dev extents, objectid is the disk number and
> offset the physical address, so prev_key->objectid should actually be
> prev_key->offset.
>
> (I can't take any credit for this one - this was discovered by Chris and
> his friend Claude.)
>
> Signed-off-by: Mark Harmstone <mark@harmstone.com>
> Suggested-by: Chris Mason <clm@fb.com>
Reviewed-by: Boris Burkov <boris@bur.io>
> Fixes: 008e2512dc56 ("btrfs: tree-checker: add dev extent item checks")
> ---
> fs/btrfs/tree-checker.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
> index 452394b34d01..9774779f060b 100644
> --- a/fs/btrfs/tree-checker.c
> +++ b/fs/btrfs/tree-checker.c
> @@ -1921,7 +1921,7 @@ static int check_dev_extent_item(const struct extent_buffer *leaf,
> if (unlikely(prev_key->offset + prev_len > key->offset)) {
> generic_err(leaf, slot,
> "dev extent overlap, prev offset %llu len %llu current offset %llu",
> - prev_key->objectid, prev_len, key->offset);
> + prev_key->offset, prev_len, key->offset);
> return -EUCLEAN;
> }
> }
> --
> 2.52.0
>
next prev parent reply other threads:[~2026-02-17 17:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 10:34 [PATCH] btrfs: fix incorrect error message in check_dev_extent_item() Mark Harmstone
2026-02-17 17:04 ` Boris Burkov [this message]
2026-02-17 21:01 ` Qu Wenruo
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=aZSfpwbIsDs1zznG@devvm12410.ftw0.facebook.com \
--to=boris@bur.io \
--cc=clm@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=mark@harmstone.com \
--cc=wqu@suse.com \
/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