Re: [RFC ONLY 3/8] btrfs: read raid-stripe-tree from disk

Qu Wenruo
2022-05-19T13:27:16Z

On 2022/5/19 19:53, Johannes Thumshirn wrote:
> On 19/05/2022 13:48, Qu Wenruo wrote:
>>
>> On 2022/5/19 19:44, Johannes Thumshirn wrote:
>>> On 19/05/2022 12:37, Qu Wenruo wrote:
>>>>> RAID1 on zoned only needs a stripe tree for data, not for meta-data/system,
>>>>> so it will work and we can bootstrap from it.
>>>>>
>>>> That sounds good.
>>>>
>>>> And in that case, we don't need to put stripe tree into system chunks at
>>>> all.
>>>>
>>>> So this method means, stripe tree is only useful for data.
>>>> Although it's less elegant, it's much saner.
>>> Yes and no. People still might want to use different metadata profiles than
>>> RAID1.
>> For RAID1 variants like RAID1C3/4, I guess we don't need stripe tree either?
>>
>> What about DUP? If RAID1*/DUP/SINGLE all doesn't need stripe tree, I
>> believe that's already a pretty good profile set for most zoned device
>> users.
>>
>> Personally speaking, it would be much simpler to avoid bothering the
>> stripe tree for metadata.
>
> I totally agree, but once you get past say 10 drives you might want to have
> different encoding schemes and also have a higher level of redundancy for your
> metadata than just 4 copies.
>
> The stripe tree will also hold any l2p information for erasure coded RAID
> arrays once that's done.
>
> So this definitively should be considered.

Then let us consider the extra chunk type flag, like
BTRFS_BLOCK_GROUP_HAS_STRIPE_TREE, and then expand the combination from
the initial RAID1*|HAS_STRIPE_TREE to other profiles.

But for over 10 devices, I doubt we really need to bother metadata that
much. Consider we go RAID1C4, we have the ability to lose 3 devices
already, that's way stronger than RAID6. For metadata I believe it's
completely fine already.

Normally it's data requiring more balance between cost and redundancy as
they are the main part of a fs.

Thus even for 10 disk, metadata RAID1C4, data RAID6 (with stripe tree
for zoned), it still looks very reasonable to me at least.

Thanks,
Qu