Re: RAID56 discussion related to RST. (Was "Re: [RFC ONLY 0/8] btrfs: introduce raid-stripe-tree")

Johannes Thumshirn
2022-07-14T07:08:39Z

On 14.07.22 03:08, Qu Wenruo wrote:> [CASE 2 CURRENT WRITE ORDER, PADDING> No difference than case 1, just when we have finished sector 7, all > zones are exhausted.>> Total written bytes: 64K> Expected written bytes: 128K (nr_data * 64K)> Efficiency: 1 / nr_data.>
I'm sorry but I have to disagree.
If we're writing less than 64k, everything beyond these 64k will get filled up with 0

0 64K
Disk 1 | D1| 0 | 0 | 0 | 0 | 0 | 0 | 0 | (Data stripe)
Disk 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | (Data stripe)
Disk 3 | P | P | P | P | P | P | P | P | (Parity stripe)

So the next write (the CoW) will then be:

64k 128K
Disk 1 | D1| 0 | 0 | 0 | 0 | 0 | 0 | 0 | (Data stripe)
Disk 2 | D2| 0 | 0 | 0 | 0 | 0 | 0 | 0 | (Data stripe)
Disk 3 | P'| P'| P'| P'| P'| P'| P'| P'| (Parity stripe)

For zoned we can play this game zone_size/stripe_size times, which on a typical
SMR HDD would be:

126M/64k = 4096 times until you fill up a zone.

I.e. if you do stupid things you get stupid results. C'est la vie.