public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Mike Snitzer <snitzer@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
	dm-devel@lists.linux.dev, linux-block@vger.kernel.org,
	Marco Patalano <mpatalan@redhat.com>,
	Ewan Milne <emilne@redhat.com>,
	linux-raid@vger.kernel.org
Subject: Re: dm: retain stacked max_sectors when setting queue_limits
Date: Thu, 23 May 2024 09:52:40 +0800	[thread overview]
Message-ID: <Zk6haNVa5JXxlOf1@fedora> (raw)
In-Reply-To: <Zk4h-6f2M0XmraJV@kernel.org>

On Wed, May 22, 2024 at 12:48:59PM -0400, Mike Snitzer wrote:
> On Wed, May 22, 2024 at 04:24:58PM +0200, Christoph Hellwig wrote:
> > On Tue, May 21, 2024 at 10:51:17PM -0400, Mike Snitzer wrote:
> > > Otherwise, blk_validate_limits() will throw-away the max_sectors that
> > > was stacked from underlying device(s). In doing so it can set a
> > > max_sectors limit that violates underlying device limits.
> > 
> > Hmm, yes it sort of is "throwing the limit away", but it really
> > recalculates it from max_hw_sectors, max_dev_sectors and user_max_sectors.
> 
> Yes, but it needs to do that recalculation at each level of a stacked
> device.  And then we need to combine them via blk_stack_limits() -- as
> is done with the various limits stacking loops in
> drivers/md/dm-table.c:dm_calculate_queue_limits

This way looks one stacking specific requirement, just wondering why not
put the logic into blk_validate_limits() by passing 'stacking' parameter?
Then raid can benefit from it oo.

thanks,
Ming


  parent reply	other threads:[~2024-05-23  1:52 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 [this message]
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
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=Zk6haNVa5JXxlOf1@fedora \
    --to=ming.lei@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=emilne@redhat.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=mpatalan@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