From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Anand Jain <anand.jain@oracle.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH RFC] btrfs: fix read corrpution from disks of different generation
Date: Wed, 20 Mar 2019 09:02:20 +0800 [thread overview]
Message-ID: <36d9d5d6-323c-ebe6-5170-3b2555130bfd@gmx.com> (raw)
In-Reply-To: <055cad22-76be-1547-c7f7-4de54dd1049c@oracle.com>
[-- Attachment #1.1: Type: text/plain, Size: 2647 bytes --]
On 2019/3/20 上午7:41, Anand Jain wrote:
>
>>> But csum verification is a point in verification and its not a
>>> tree based transid verification. Which means if there is a stale data
>>> with matching csum we may return a junk data silently.
>>
>> Then the normal idea is to use stronger but slower csum in the first
>> place, to avoid the csum match case.
>
> This is just a general observational comment, its ok lets assume
> current point in csum verification works (as opposed to tree based
> parent transid verification).
>
>>> This problem is
>>> easily reproducible when csum is disabled but not impossible to
>>> achieve
>>> when csum is not disabled as well.
>>
>> Under this case, it's the user to be blamed for the decision to disable
>> the csum in the first place.
>
> The point here is. The logic isn't aware of the write hole on the other
> disk on which the metadata is not verified. I disagree that nocsum or
> the user to be blamed.
>
>>
>>> A tree based integrity verification
>>> is important for all data, which is missing.
>>> Fix:
>>> In this RFC patch it proposes to use same disk from with the
>>> metadata
>>> is read to read the data.
>>
>> The obvious problem I found is, the idea only works for RAID1/10.
>>
>> For striped profile it makes no sense, or even have a worse chance to
>> get stale data.
>>
>>
>> To me, the idea of using possible better mirror makes some sense, but
>> very profile limited.
>
> Yep. This problem and fix is only for the mirror based profiles
> such as raid1/raid10.
Then current implementation lacks such check.
Further more, data and metadata can lie in different chunks and have
different chunk types.
>
>>
>> Another idea I get inspired from the idea is, make it more generic so
>> that bad/stale device get a lower priority.
>
> When it comes to reading junk data, its not about the priority its
> about the eliminating. When the problem is only few blocks, I am
> against making the whole disk as bad.
>
>> Although it suffers the same problem as I described.
>>
>> To make the point short, the use case looks very limited.
>
> It applies to raid1/raid10 with nodatacow (which implies nodatasum).
> In my understanding that's not rare.
>
> Any comments on the fix offered here?
The implementation part is, is eb->read_mirror reliable?
E.g. if the data and the eb are in different chunks, and the stale
happens in the chunk of eb but not in the data chunk?
Thanks,
Qu
>
> Thanks, Anand
>
>
>> Thanks,
>> Qu
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-03-20 1:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-19 11:35 [PATCH RFC] btrfs: fix read corrpution from disks of different generation Anand Jain
2019-03-19 11:35 ` [PATCH] fstests: btrfs test read " Anand Jain
2020-04-06 12:00 ` [PATCH v2] " Anand Jain
2019-03-19 12:07 ` [PATCH RFC] btrfs: fix read corrpution " Qu Wenruo
2019-03-19 23:41 ` Anand Jain
2019-03-20 1:02 ` Qu Wenruo [this message]
2019-03-20 5:47 ` Anand Jain
2019-03-20 6:19 ` Qu Wenruo
2019-03-20 14:00 ` Anand Jain
2019-03-20 14:40 ` Qu Wenruo
2019-03-20 15:40 ` Zygo Blaxell
2019-03-21 6:37 ` Anand Jain
2019-03-20 6:27 ` Qu Wenruo
2019-03-20 13:54 ` Anand Jain
2019-03-20 15:46 ` Zygo Blaxell
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=36d9d5d6-323c-ebe6-5170-3b2555130bfd@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/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