From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Miroslav Cimerman <mc@raidlab.org>, Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org, David Sterba <dsterba@suse.com>,
Chris Mason <mason@kernel.org>,
Naohiro Aota <naohiro.aota@wdc.com>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] btrfs: scrub: don't count zoned repairs as corrected on a degraded mount
Date: Thu, 19 Nov 2026 13:07:04 +1030 [thread overview]
Message-ID: <f944d77c-4c66-4dec-acb8-985d4288afc6@gmx.com> (raw)
In-Reply-To: <HLy1GbxoNDmZhdhuxdyatdLIiWG6jabGJiSOxke3u7mRd-njBgBiRytg1IKO1S2E6xNXQw75eH4SPWLLXC6TC0BNXXcz0SV3FsdSOQUQLdg=@raidlab.org>
在 2026/11/19 11:52, Miroslav Cimerman 写道:
> Qu Wenruo <wqu@suse.com> wrote:
>
>> 在 2026/11/19 04:26, Miroslav Cimerman 写道:
>
>>> On a degraded mount btrfs_repair_one_zone() relocates nothing ("Do not
>>> attempt to repair in degraded state"),
>>
>> I think this is a little weird, any special reason for this in the first
>> place?
>
> It was probably meant to check for a missing device (so that a mirror's
> redundancy won't be downgraded by the relocation).
If it's a workaround for the well known new-SINGLE chunks during
degraded writes, it may be a little over-killed.
A lot of btrfs-progs commands will do give extra warning when such
unexpected profiles are detected, so end users can later balance them
out after recovering.
(It's not the best solution, but it is not zoned specific either)
I'm more concerned if it's some extra requirement for zoned RAID
profiles, e.g. to keep the writer pointers in sync etc.
> But because it checks
> with the mount flag, a -o degraded mount with no missing devices does
> not get bad copies repaired by scrub.
>
> I propose a v2 series, where 1/2 replaces the current mount flag check
> with a missing devices check, and 2/2 is this patch modified to use the
> same missing devices check as 1/2, so they are in sync. 2/2 is still
> needed because for example RAID1C3 can have all: a good copy, bad copy,
> and a missing device.
And I'd prefer if you can get some helper to know if this block group
can be repaired, so that no duplicated checks between repair and scrub.
Thanks,
Qu
>
> Are you okay with the proposal, Qu?
>
>>> Fixes: 54765392a1b9 ("btrfs: scrub: introduce helper to queue a stripe for scrub")
>>
>> I do not think this is the correct fixes tag, that commit is just
>> calling btrfs_repair_one_zone(), and btrfs is already calling that before.
>
> You are right, the Fixes tag should be:
>
> Fixes: f7ef5287a63d ("btrfs: zoned: relocate block group to repair IO failure in zoned filesystems")
>
> Thanks,
> Miroslav
prev parent reply other threads:[~2026-11-19 2:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 17:56 Miroslav Cimerman
2026-11-18 20:37 ` Qu Wenruo
2026-11-19 1:22 ` Miroslav Cimerman
2026-11-19 2:37 ` Qu Wenruo [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=f944d77c-4c66-4dec-acb8-985d4288afc6@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=dsterba@suse.com \
--cc=johannes.thumshirn@wdc.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mason@kernel.org \
--cc=mc@raidlab.org \
--cc=naohiro.aota@wdc.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
all inboxes | Powered by JetHome®