public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: John Garry <john.g.garry@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: blk_validate_limits validation of block size (was Re: [PATCH v2] null_blk: fix validation of block size)
Date: Wed, 3 Jul 2024 06:19:32 -0700	[thread overview]
Message-ID: <ZoVP5NZhCmMH6qBp@infradead.org> (raw)
In-Reply-To: <43aab70c-8521-4dfa-847a-1175d31a55d1@oracle.com>

On Wed, Jul 03, 2024 at 01:20:26PM +0100, John Garry wrote:
> So if we stop validating the limits in a., there is a user-visible change in
> behaviour (as we stop rejecting invalid limits from the NBD_SET_BLKSIZE
> ioctl).
> 
> We could add a "dryrun" option to queue_limits_commit_update() (and call
> that instead of blk_validate_block_size(), which is effectively the same as
> calling blk_validate_block_size()). Or we can keep
> nbd as the only blk_validate_limits() user (outside the block layer).

I'd just keep the extra external blk_validate_block_size call in nbd.c.

Maybe add a comment to the blk_validate_block_size declaration that
drivers should not bother with it as it's already done by
blk_validate_limits.

  reply	other threads:[~2024-07-03 13:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03 19:26 [PATCH v2] null_blk: fix validation of block size Andreas Hindborg
2024-06-03 19:47 ` Keith Busch
2024-06-04  4:46   ` Christoph Hellwig
2024-06-28 14:30     ` John Garry
2024-06-29  5:07       ` Christoph Hellwig
2024-07-03 12:20         ` blk_validate_limits validation of block size (was Re: [PATCH v2] null_blk: fix validation of block size) John Garry
2024-07-03 13:19           ` Christoph Hellwig [this message]
2024-07-03 17:28             ` John Garry
2024-07-04  6:18               ` Christoph Hellwig
2024-06-04  1:27 ` [PATCH v2] null_blk: fix validation of block size Ming Lei
2024-06-04 14:17 ` Jens Axboe

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=ZoVP5NZhCmMH6qBp@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=john.g.garry@oracle.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@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