On Wed, Jun 21, 2017 at 8:12 PM, Qu Wenruo <quwen...@cn.fujitsu.com> wrote:

>
> Well, in fact, thanks to data csum and btrfs metadata CoW, there is quite a
> high chance that we won't cause any data damage.

But we have examples where data does not COW, we see a partial stripe
overwrite. And if that is interrupted it's clear that both old and new
metadata pointing to that stripe is wrong. There are way more problems
where we see csum errors on Btrfs raid56 after crashes, and there are
no bad devices.



>
> For the example I gave above, no data damage at all.
>
> First the data is written and power loss, and data is always written before
> metadata, so that's to say, after power loss, superblock is still using the
> old tree roots.
>
> So no one is really using that newly written data.

OK but that assumes that the newly written data is always COW which on
Btrfs raid56 is not certain, there's a bunch of RMW code which
suggests overwrites are possible.

And for raid56 metadata it suggests RMW could happen for metadata also.

There's fairly strong anecdotal evidence that people have less
problems with Btrfs raid5 when raid5 applies to data block groups, and
metadata block groups use some other non-parity based profile like
raid1.



-- 
Chris Murphy
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to