From: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"dm-devel@lists.linux.dev" <dm-devel@lists.linux.dev>,
Jens Axboe <axboe@kernel.dk>, Mike Snitzer <snitzer@kernel.org>,
Mikulas Patocka <mpatocka@redhat.com>
Subject: Re: [PATCH for-next] dm: split write BIOs on zone boundaries when zone append is not emulated
Date: Thu, 17 Jul 2025 10:33:56 +0000 [thread overview]
Message-ID: <h7u7oxijglhp5nw5eizznlc4o247wkbihxsjmg4czhvsgohlud@kk3ldg6colfr> (raw)
In-Reply-To: <9ac957aa-682a-4997-8578-068444a4b778@kernel.org>
On Jul 17, 2025 / 17:18, Damien Le Moal wrote:
> On 2025/07/17 11:32, Shin'ichiro Kawasaki wrote:
> > Since commit f70291411ba2 ("block: Introduce
> > bio_needs_zone_write_plugging()"), blk_mq_submit_bio() no longer splits
> > write BIOs to comply with the requirements of zoned block devices. This
> > change applies to write BIOs issued by zoned DM targets. Following this
> > modification, it is expected that DM targets themselves split write BIOs
> > for zoned block devices.
>
> This description is confusing: if the underlying device of a DM target is a
> blk-mq block device, then blk_mq_submit_bio() will be called and will split BIOs
> as needed, regardless of what the DM target did. For BIOs that are issued by the
> user/FS to the DM device, then that is when bio_needs_zone_write_plugging() is
> used by DM core to determine if a BIO must be split.
>
> Anyway, I do not think you need to reference this commit. So I would drop this
> entire paragraph from the commit message, and start the explanation with the
> below paragraph. That is very clear I think.
>
> > Commit 2df7168717b7 ("dm: Always split write BIOs to zoned device
> > limits") updates the device-mapper driver to perform splits for the
> > write BIOs. However, it did not address the cases where DM targets do
> > not emulate zone append, such as in the cases of dm-linear or dm-flakey.
> > For these targets, when the write BIOs span across zone boundaries, they
> > trigger WARN_ON_ONCE(bio_straddles_zones(bio)) in
> > blk_zone_wplug_handle_write(). This results in I/O errors. The errors
> > are reproduced by running blktests test case zbd/004 using zoned
> > dm-linear or dm-flakey devices.
> >
> > To avoid the I/O errors, handle the write BIOs regardless whether DM
> > targets emulate zone append or not, so that all write BIOs are split at
> > zone boundaries. For that purpose, drop the check for zone append
> > emulation in dm_zone_bio_needs_split(). Its argument 'md' is no longer
> > used then drop it also.
> >
> > Fixes: 2df7168717b7 ("dm: Always split write BIOs to zoned device limits")
> > Cc: stable@vger.kernel.org
>
> The above patch is queued in block-next, so there is no need for this CC-stable.
> Remove it please.
>
> > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
>
> One more nit below.
>
> With these fixed, feel free to add:
>
> Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Thanks. I will reflect your comments and send out v2 soon.
prev parent reply other threads:[~2025-07-17 10:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 2:32 [PATCH for-next] dm: split write BIOs on zone boundaries when zone append is not emulated Shin'ichiro Kawasaki
2025-07-17 8:18 ` Damien Le Moal
2025-07-17 10:33 ` Shinichiro Kawasaki [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=h7u7oxijglhp5nw5eizznlc4o247wkbihxsjmg4czhvsgohlud@kk3ldg6colfr \
--to=shinichiro.kawasaki@wdc.com \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=dm-devel@lists.linux.dev \
--cc=linux-block@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=snitzer@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;
as well as URLs for NNTP newsgroup(s).