From: "Lakshmipathi.G" <lakshmipathi.g@giis.co.in>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org, kreijack@inwind.it
Subject: Re: [PATCH] btrfs-progs: RAID5:Inject data stripe corruption and verify scrub fixes it.
Date: Tue, 21 Feb 2017 15:11:40 +0530 [thread overview]
Message-ID: <20170221094140.GB5217@giis.co.in> (raw)
In-Reply-To: <6fee8854-fc3f-c664-4004-b3579208b234@cn.fujitsu.com>
> >
> >Looked into patch description:
> >
> >After scrubbing dev3 only:
> >0xcdcd (Good) | 0xcdcd | 0xcdcd (Bad)
> > (D1) (D2) (P)
> >
> >So the Parity stripe (P) always get replaced by exact content of D1/D2 (data-stripe)
> >or by random data?
>
> Neither. it's just XOR result of D2(never changed, 0xcdcd) and old D1(wrong,
> 0x0000).
> 0xcdcd XOR 0x0000 = 0xcdcd
>
> So you got 0xcdcd, bad result.
>
> If you corrupt D1 with random data, then parity will be random then.
>
> >If it always get replaced by exact value from either
> >D1 or D2. I think current script can be modified to detect that bug. If parity gets
> >replaced by random value, then it will the make task more difficult.
>
> Not hard to detect.
> As the content is completely under your control, you know the correct parity
> value, and you can verify it very easy.
>
version-3 of this script calculates exact data/parity location, instead of dumping data
and searching locations. Tested with upto 8MB file, from the output all 128 data-stripes
and 64 parity stripe location seems fine. It constantly hit the parity bug with the script.
If the script gets accepted, will add slightly other corruption variants likes:
- corrupt all even stripe (D2,D4..)
- corrupt all odd stripe (D1,D3..)
- corrupt all parity stripes
- corrupt all both data stripe (D0 & D1) and expect error message
(Cover above cases for RAID6)
thanks.
Cheers.
Lakshmipathi.G
prev parent reply other threads:[~2017-02-21 9:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 9:03 [PATCH] btrfs-progs: RAID5:Inject data stripe corruption and verify scrub fixes it Lakshmipathi.G
[not found] ` <e0a04535-80ad-671c-15b7-4a37305c1be4@cn.fujitsu.com>
2017-02-15 20:56 ` Lakshmipathi.G
[not found] ` <6fee8854-fc3f-c664-4004-b3579208b234@cn.fujitsu.com>
2017-02-16 15:51 ` Lakshmipathi.G
2017-02-21 9:41 ` Lakshmipathi.G [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170221094140.GB5217@giis.co.in \
--to=lakshmipathi.g@giis.co.in \
--cc=kreijack@inwind.it \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).