Re: [RFC 00/15] btrfs: RAID5 with RAID stripe-tree (zoned + non-zoned)
Johannes Thumshirn <[email protected]>
| Newsgroups | org.kernel.vger.linux-btrfs |
|---|---|
| Message-ID | <[email protected]> |
On 6/23/26 12:39 PM, sun k wrote: > I've just noticed that I'm not sure about your mindset of this raid5/6 > rst feature. > So I want to know do you think the raid5/6 rst is extent layer raid or > block layer raid? > Because they are quite different and I need to align it with you > before further discussion. I did have a what you call block-layer parity raid without and RMW in mind. But RST is only a mapping layer, so I think we can go "extent layer" as well. Hence the early RFC, I'm still open to changes, as long as it works on zoned filesystems. Qu's idea with a RAID4 style (I say style because I want to be able to use multiple parities in the future) with dedicated parity disks is something worth exploring as well IMHO. [leaving the rest for context] > For extent layer raid5/6, it's more like what zfs is doing now: we do > the "raid" thing on each > file extent, split big extent into stripes, and write them on > different disks with parity. The issue > of this is that the performance and efficiency on small extents is > bad, but we can always > do full stripe write, avoiding write hole issues. > > For block layer raid5/6, which is like what we currently have without > rst, we need to deal with the > write hole issue, possibly by > 1. totally avoid read-modify-write for a partial stripe update. We > always write into a new stripe > append only instead of modifying an existing stripe, like writing a > zoned device even on non-zoned device. > 2. or we allow read-modify-write for a partial stripe update, but > write the D and P elsewhere > instead of in-place. > > Option 2 will cause another free space management issue I've mentioned before: > let's take a 4 disk raid 5 as example. > before the partial stripe update, logical address LA is mapped to > physical address PA0(D0), PA1(D1), PA2(D2), PA3(P); > after updating D2, LA is mapped to address PA0(D0), PA1(D1), PA2'(D2'), PA3'(P') > then we need to allocate PA2' and PA3' , and free PA2 and PA3 on disk 2 and 3. > Since currently btrfs manage freespace based on logical address, how > to manage the allocation and manage physical free space? >