From: Qu Wenruo <wqu@suse.com>
To: li zhang <zhanglikernel@gmail.com>,
Qu Wenruo <quwenruo.btrfs@gmx.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: scrub: expand scrub block size for data range scrub
Date: Wed, 16 Nov 2022 06:57:04 +0800 [thread overview]
Message-ID: <77b0da75-8ef8-42d5-c8c5-bfd63bf7c4f0@suse.com> (raw)
In-Reply-To: <CAAa-AGmqmnKyQ_LgxB-oVnP+8tP9QChSq2M_SPhtgPQBxd3Skw@mail.gmail.com>
On 2022/11/16 02:29, li zhang wrote:
> Qu Wenruo <quwenruo.btrfs@gmx.com> 于2022年11月15日周二 18:37写道:
>>
>> [Adding the mailing list, as the reply is to the first mail I got, which
>> lacks the ML]
>>
>> On 2022/11/15 06:39, Qu Wenruo wrote:
>> [...]
>
>> I'll try to craft a PoC patchset to a stripe by stripe verification (to
>> get rid of the complex bio form shaping code), and a proper bitmap based
>> verification and repair (to only repair the corrupted sectors).
>>
>> But as I mentioned above, the bad csum error reporting can not be easily
>> fixed without a behavior change on btrfs_scrub_progress results.
>>
>
> Actually, I also considered refactoring the functions
> scrub_recheck_block and scrub_recheck_block_checksum to import a
> bitmap to represent bad sectors, but this seems too complicated and
> may affect many things,
Another thing I don't like is the various jumps using different end_io
functions.
I'm a super big fan of submit-and-wait, and already converted RAID56 to
this way.
Thus I believe I can also handle the situation in scrub, and hopefully
get it easier to read.
> so I choose
> Handle newly discovered errors by recheck in
> scrub_handle_errored_block, ignoring recheck errors by exchanging the
> result of the first check and the result of the recheck, as follows:
> else if (!check_sector->checksum_error && bad_sector->checksum_error) {
> struct scrub_sector *temp_sector = sblock_bad->sectors[sector_num];
>
> sblock_bad->sectors[sector_num]
> = sblock_to_check->sectors[sector_num];
> sblock_to_check->sectors[sector_num] = temp_sector;
>
> Anyway, I'll take a hard look at your scrub_fs idea
Feel free to do any comments, I'm pretty eager to get some feedback on it.
Thanks,
Qu
prev parent reply other threads:[~2022-11-15 22:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-13 15:35 [PATCH] btrfs: scrub: expand scrub block size for data range scrub Li Zhang
2022-11-13 15:37 ` li zhang
2022-11-13 22:37 ` Qu Wenruo
2022-11-13 22:58 ` Qu Wenruo
2022-11-14 14:52 ` li zhang
[not found] ` <CAAa-AGmQpL34eG8yx3bg8FYcbbOOjb3o8fb5YEocRbRPH1=NBw@mail.gmail.com>
[not found] ` <11a71790-de79-3c2f-97f3-b97305b99378@gmx.com>
2022-11-15 10:37 ` Qu Wenruo
2022-11-15 18:29 ` li zhang
2022-11-15 22:57 ` Qu Wenruo [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=77b0da75-8ef8-42d5-c8c5-bfd63bf7c4f0@suse.com \
--to=wqu@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=zhanglikernel@gmail.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).