From: Mike Snitzer <snitzer@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: dm-devel@lists.linux.dev, linux-block@vger.kernel.org,
Marco Patalano <mpatalan@redhat.com>,
Ewan Milne <emilne@redhat.com>
Subject: Re: dm: retain stacked max_sectors when setting queue_limits
Date: Thu, 23 May 2024 10:12:24 -0400 [thread overview]
Message-ID: <Zk9OyGTESlHXu6Wa@kernel.org> (raw)
In-Reply-To: <20240523082731.GA3010@lst.de>
On Thu, May 23, 2024 at 10:27:31AM +0200, Christoph Hellwig wrote:
> On Wed, May 22, 2024 at 12:48:59PM -0400, Mike Snitzer wrote:
> > [ 74.872485] blk_insert_cloned_request: over max size limit. (2048 > 1024)
> > [ 74.872505] device-mapper: multipath: 254:3: Failing path 8:16.
> > [ 74.872620] blk_insert_cloned_request: over max size limit. (2048 > 1024)
> > [ 74.872641] device-mapper: multipath: 254:3: Failing path 8:32.
> > [ 74.872712] blk_insert_cloned_request: over max size limit. (2048 > 1024)
> > [ 74.872732] device-mapper: multipath: 254:3: Failing path 8:48.
> > [ 74.872788] blk_insert_cloned_request: over max size limit. (2048 > 1024)
> > [ 74.872808] device-mapper: multipath: 254:3: Failing path 8:64.
> >
> > Simply setting max_user_sectors won't help with stacked devices
> > because blk_stack_limits() doesn't stack max_user_sectors. It'll
> > inform the underlying device's blk_validate_limits() calculation which
> > will result in max_sectors having the desired value (which it already
> > did, as I showed above). But when stacking limits from underlying
> > devices up to the higher-level dm-mpath queue_limits we still have
> > information loss.
>
> So while I can't reproduce it, I think the main issue is that
> max_sectors really just is a voluntary limit, and enforcing that at
> the lower device doesn't really make any sense. So we could just
> check blk_insert_cloned_request to check max_hw_sectors instead.
I haven't tried your patch but we still want properly stacked
max_sectors configured for the device.
> Or my below preferre variant to just drop the check, as the
> max_sectors == 0 check indicates it's pretty sketchy to start with.
At this point in the 6.10 release I don't want further whack-a-mole
fixes due to fallout from removing longstanding negative checks.
Not sure what is sketchy about the max_sectors == 0 check, the large
comment block explains that check quite well. We want to avoid EIO
for unsupported operations (otherwise we'll get spurious path failures
in the context of dm-multipath). Could be we can remove this check
after an audit of how LLD handle servicing IO for unsupported
operations -- so best to work through it during a devel cycle.
Not sure why scsi_debug based testing with mptest isn't triggering it
for you. Are you seeing these limits for the underlying scsi_debug
devices?
./max_hw_sectors_kb:2147483647
./max_sectors_kb:512
What are those limits for the mptest created 'mp' dm-multipath device?
Mike
next prev parent reply other threads:[~2024-05-23 14:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 2:51 [PATCH] dm: retain stacked max_sectors when setting queue_limits Mike Snitzer
2024-05-22 14:24 ` Christoph Hellwig
2024-05-22 16:48 ` Mike Snitzer
2024-05-22 17:37 ` Ewan Milne
2024-05-23 1:52 ` Ming Lei
2024-05-23 15:38 ` [PATCH for-6.10-rc1] block: fix blk_validate_limits() to properly handle stacked devices Mike Snitzer
2024-05-23 15:44 ` Christoph Hellwig
2024-05-23 15:48 ` Mike Snitzer
2024-05-23 15:52 ` Christoph Hellwig
2024-05-23 16:38 ` Mike Snitzer
2024-05-23 17:05 ` Christoph Hellwig
2024-05-23 17:14 ` Mike Snitzer
2024-05-23 7:16 ` dm: retain stacked max_sectors when setting queue_limits Christoph Hellwig
2024-05-23 8:27 ` Christoph Hellwig
2024-05-23 14:12 ` Mike Snitzer [this message]
2024-05-23 14:49 ` Christoph Hellwig
2024-05-23 15:44 ` Mike Snitzer
2024-05-23 15:50 ` Christoph Hellwig
2024-05-23 16:44 ` Mike Snitzer
2024-05-23 17:03 ` Christoph Hellwig
2024-05-22 20:33 ` [PATCH] " Ewan Milne
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=Zk9OyGTESlHXu6Wa@kernel.org \
--to=snitzer@kernel.org \
--cc=dm-devel@lists.linux.dev \
--cc=emilne@redhat.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=mpatalan@redhat.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).