From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, janpieter.sollie@edpnet.be,
Mike Snitzer <snitzer@kernel.org>,
dm-devel@lists.linux.dev, Song Liu <song@kernel.org>,
linux-raid@vger.kernel.org
Subject: Re: [PATCH] block: allow device to have both virt_boundary_mask and max segment size
Date: Mon, 8 Apr 2024 15:36:50 +0800 [thread overview]
Message-ID: <ZhOekuZdwlwNSiZV@fedora> (raw)
In-Reply-To: <20240408055542.GA15653@lst.de>
On Mon, Apr 08, 2024 at 07:55:42AM +0200, Christoph Hellwig wrote:
> On Sun, Apr 07, 2024 at 09:19:31PM +0800, Ming Lei wrote:
> > When one stacking device is over one device with virt_boundary_mask and
> > another one with max segment size, the stacking device have both limits
> > set. This way is allowed before d690cb8ae14b ("block: add an API to
> > atomically update queue limits").
> >
> > Relax the limit so that we won't break such kind of stacking setting.
>
> No, this is broken as discussed before. With a virt_boundary_mask
> we create a segment for every page (that is device page, which usually
> but not always is the same as the Linux page size). If we now also
> limit the segment size, we fail to produce valid I/O.
It isn't now we put the limit, and this way has been done for stacking device
since beginning, it is actually added by commit d690cb8ae14b in v6.9-rc1.
If max segment size isn't aligned with virt_boundary_mask, bio_split_rw()
will split the bio with max segment size, this way still works, just not
efficiently. And in reality, the two are often aligned.
>
> The problem is that that neither the segment_size nor the
> virtual_boundary should be inherited by a stackable device and we
> need to fix that.
It is one big change with regression risk, which may not be good after -rc3.
Thanks,
Ming
next prev parent reply other threads:[~2024-04-08 7:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-07 13:19 [PATCH] block: allow device to have both virt_boundary_mask and max segment size Ming Lei
2024-04-07 14:57 ` Mike Snitzer
2024-04-07 21:50 ` [PATCH] " Jens Axboe
2024-04-08 5:55 ` Christoph Hellwig
2024-04-08 7:36 ` Ming Lei [this message]
2024-04-08 8:47 ` Christoph Hellwig
2024-04-08 9:48 ` Ming Lei
2024-04-09 13:57 ` Christoph Hellwig
2024-04-09 15:56 ` Ming Lei
2024-04-08 12:48 ` janpieter.sollie
2024-04-24 10:26 ` Geert Uytterhoeven
2024-04-24 12:41 ` Ming Lei
2024-04-24 13:09 ` Geert Uytterhoeven
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=ZhOekuZdwlwNSiZV@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@lists.linux.dev \
--cc=hch@lst.de \
--cc=janpieter.sollie@edpnet.be \
--cc=linux-block@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=snitzer@kernel.org \
--cc=song@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.