From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Naohiro Aota <Naohiro.Aota@wdc.com>,
Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: new scrub code vs zoned file systems
Date: Thu, 1 Jun 2023 16:46:57 +0800 [thread overview]
Message-ID: <d5d69915-538e-e38a-4470-c9739efdffb5@gmx.com> (raw)
In-Reply-To: <20230601072757.GA28794@lst.de>
On 2023/6/1 15:27, Christoph Hellwig wrote:
> On Thu, Jun 01, 2023 at 03:21:22PM +0800, Qu Wenruo wrote:
>> Is there any function that I can go to grab the current writer pointer?
>
> You can get the information using blkdev_report_zones, or the
> "blkzoned report" command from user space.
>
Several new bugs exposed.
- We need to forward the sctx->write_pointer after the write bio
finished
- Wrong physical bytenr passed to fill_writer_pointer_gap()
The 2nd one called in scrub_write_sectors() is passing logical
address, which is definitely a big NONO.
- Missing gaps for certain bitmap layout
If we have the following layout for write,
0 4 8 12 16
| |/////| |/////|
We should:
* Fill gap for [0, 4)
* Submit write for [4, 8)
* Fill gap for [8, 12)
* Submit write for [12, 16)
But we have a wrong check, we only file the gap request before
submitting the write bio.
This results:
* Fill gap for [0, 12)
* Submit write for [4, 8)
Obvious the write would fail.
* Fill gap for [8, 12)
No op, because the write pointer is already at 12.
* Submit write for [12, 16)
Weirdly, this would not fail, as the write pointer is at 12.
In short, the fill_writer_pointer_gap() arguments are a total mess...
I will submit a proper fix soon.
Thanks,
Qu
next prev parent reply other threads:[~2023-06-01 8:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 12:52 new scrub code vs zoned file systems Christoph Hellwig
2023-05-31 13:10 ` Johannes Thumshirn
2023-05-31 13:20 ` Christoph Hellwig
2023-05-31 13:25 ` Johannes Thumshirn
2023-05-31 13:30 ` Christoph Hellwig
2023-05-31 14:04 ` Johannes Thumshirn
2023-05-31 14:17 ` Christoph Hellwig
2023-06-01 2:09 ` Qu Wenruo
2023-06-01 4:40 ` Christoph Hellwig
2023-06-01 5:00 ` Qu Wenruo
2023-06-01 5:17 ` Naohiro Aota
2023-06-01 5:21 ` Naohiro Aota
2023-06-01 7:21 ` Qu Wenruo
2023-06-01 7:27 ` Christoph Hellwig
2023-06-01 8:46 ` Qu Wenruo [this message]
2023-06-01 5:22 ` Christoph Hellwig
2023-06-01 5:34 ` Christoph Hellwig
2023-06-01 5:45 ` Qu Wenruo
2023-06-01 5:47 ` Christoph Hellwig
2023-05-31 22:25 ` Qu Wenruo
2023-05-31 22:48 ` Qu Wenruo
2023-06-01 4:53 ` Christoph Hellwig
2023-06-01 5:04 ` Qu Wenruo
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=d5d69915-538e-e38a-4470-c9739efdffb5@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=Naohiro.Aota@wdc.com \
--cc=hch@lst.de \
--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