On Sat, Jun 25, 2016 at 11:25 AM, Chris Murphy <li...@colorremedies.com> wrote:
> On Sat, Jun 25, 2016 at 6:21 AM, Goffredo Baroncelli <kreij...@inwind.it> 
> wrote:
>> 5) I check the disks at the offsets above, to verify that the data/parity is 
>> correct
>> However I found that:
>> 1) if I corrupt the parity disk (/dev/loop2), scrub don't find any 
>> corruption, but recomputed the parity (always correctly);
> This is mostly good news, that it is fixing bad parity during scrub.
> What's not clear due to the lack of any message is if the scrub is
> always writing out new parity, or only writes it if there's a
> mismatch.
>> 2) when I corrupted the other disks (/dev/loop[01]) btrfs was able to find 
>> the corruption. But I found two main behaviors:
>> 2.a) the kernel repaired the damage, but compute the wrong parity. Where it 
>> was the parity, the kernel copied the data of the second disk on the parity 
>> disk
> Wow. So it sees the data strip corruption, uses good parity on disk to
> fix it, writes the fix to disk, recomputes parity for some reason but
> does it wrongly, and then overwrites good parity with bad parity?

The wrong parity, is it valid for the data strips that includes the
(intentionally) corrupt data?

Can parity computation happen before the csum check? Where sometimes you get:

read data strips > computer parity > check csum fails > read good
parity from disk > fix up the bad data chunk > write wrong parity
(based on wrong data)?


2371-2383 suggest that there's a parity check, it's not always being
rewritten to disk if it's already correct. But it doesn't know it's
not correct, it thinks it's wrong so writes out the wrongly computed

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