From: Qu Wenruo <wqu@suse.com>
To: dsterba@suse.cz, Christoph Hellwig <hch@lst.de>
Cc: linux-btrfs@vger.kernel.org, linux-raid@vger.kernel.org
Subject: Re: [PATCH 3/3] btrfs: disguise single-data-RAID56 as RAID1/RAID1C3
Date: Mon, 25 May 2026 20:09:54 +0930 [thread overview]
Message-ID: <e5eafd64-2704-42de-ad7b-e4f170c451e4@suse.com> (raw)
In-Reply-To: <20260525101707.GV12792@suse.cz>
在 2026/5/25 19:47, David Sterba 写道:
> On Mon, May 25, 2026 at 08:00:30AM +0200, Christoph Hellwig wrote:
>> On Sat, May 23, 2026 at 04:23:44PM +0200, David Sterba wrote:
>>> On Fri, May 22, 2026 at 06:53:53PM +0930, Qu Wenruo wrote:
>>>> Recently kernel RAID56 lib is trying to remove the unexpected
>>>> single-data-RAID56 (2 disks RAID5 or 3 disk RAID5) support, meanwhile
>>>> btrfs still supports such setup, which means in the long run btrfs has
>>>> to handle such corner case by ourselves.
>>>>
>>>> Thankfully single-data-RAID56 is really RAID1/RAID1C3, since data and
>>>> P/Q stripes all match each other, rotation also makes no difference.
>>>>
>>>> This patch will disguise those single-data-RAID56 chunks as
>>>> RAID1/RAID1C3 chunks.
>>>
>>> I don't think this is the right way to fix it. Calculations are an
>>> implementation detail and should be done at the time of the xor_gen or
>>> raid6_call, not touching the upper level structures related to format.
>>
>> It absolutely is. Adding fast path workarounds for this is completely
>> stupid when it can be trivially handled on the mount side.
>
> It's a lazy hack at best and fix on absolutely wrong layer. The library
> should provide the support for the edge case. But we disagree on that.
I strongly disagree.
Firstly on the layer to fix, let me be clear, if something writes like
RAID1, reads like RAID1, repairs like RAID1, then it's RAID1.
With that mindset, changing chunk type at read/add time is exactly the
correct layer to fix.
Or let me change the title of the patch, ENHANCE single-data-RAID56
handling to get rid all the corner cases.
Do you still think that's the wrong correct layer to fix?
So the wrong layer argument doesn't stand. If you're so focused on
fixing the problem in the library layer, then all you can see is to put
some adhoc fixes to emulate the library fix.
Furthermore, we are already doing all the warning about 2-disk raid5,
now I'm providing a solution that is as mature as RAID1, now you're
complaining about the simplicity but wants all the complex striping and
reduced read performance?
I don't see any point in this.
next prev parent reply other threads:[~2026-05-25 10:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 9:23 [PATCH 0/3] btrfs: disguise single-data-RAID56 as RAID1/RAID1C3 Qu Wenruo
2026-05-22 9:23 ` [PATCH 1/3] btrfs: remove btrfs_chunk_map::io_(align|width) members Qu Wenruo
2026-05-22 9:23 ` [PATCH 2/3] btrfs: remove duplicated block group type assignment Qu Wenruo
2026-05-22 9:23 ` [PATCH 3/3] btrfs: disguise single-data-RAID56 as RAID1/RAID1C3 Qu Wenruo
2026-05-23 14:23 ` David Sterba
2026-05-23 22:46 ` Qu Wenruo
2026-05-24 4:13 ` Qu Wenruo
2026-05-25 10:12 ` David Sterba
2026-05-25 10:25 ` Qu Wenruo
2026-05-25 6:00 ` Christoph Hellwig
2026-05-25 10:17 ` David Sterba
2026-05-25 10:39 ` Qu Wenruo [this message]
2026-05-26 6:46 ` Christoph Hellwig
2026-05-26 6:45 ` Christoph Hellwig
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=e5eafd64-2704-42de-ad7b-e4f170c451e4@suse.com \
--to=wqu@suse.com \
--cc=dsterba@suse.cz \
--cc=hch@lst.de \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-raid@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