All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Subject: Re: [PATCH 1/2] block: also check bio alignment for bio based drivers
Date: Tue, 9 Jul 2024 21:50:48 +0800	[thread overview]
Message-ID: <Zo1AOKOK7dCpPll2@fedora> (raw)
In-Reply-To: <20240705133630.GA30748@lst.de>

On Fri, Jul 05, 2024 at 03:36:30PM +0200, Christoph Hellwig wrote:
> On Fri, Jul 05, 2024 at 09:22:35PM +0800, Ming Lei wrote:
> > On Fri, Jul 05, 2024 at 02:56:50PM +0200, Christoph Hellwig wrote:
> > > Extend the checks added in 0676c434a99b ("block: check bio alignment
> > > in blk_mq_submit_bio") for blk-mq drivers to bio based drivers as
> > > all the same reasons apply for them as well.
> > 
> > Do we have bio based driver which may re-configure logical block size?
> 
> nvme multipath can, and it looks drbd might be able to do so as well.

nvme multipath should be fine since the check is done for the underlying nvme
device.

drbd doesn't call freeze queue, so it shouldn't have done that.

> 
> > If yes, is it enough to do so? Cause queue usage counter is only held
> > during bio submission, and it won't cover the whole bio lifetime.
> 
> Yes.  But for me the prime intend here is not to prevent that, but
> to ensure we actually have the damn sanity check for all drivers
> instead of just a few and instead a gazillion more or less equivalent
> open coded versions.
> 
> That doesn't mean we shouldn't look into actually holding q_usage_count
> over the entire bio lifetime for bio based drivers, but that's a
> separate project.

What if logical block size is changed between bio submission and
completion?

For blk-mq device, we need to drain any IO when re-configuring device,
however it can't be supported generically for bio based driver.



Thanks,
Ming


  reply	other threads:[~2024-07-09 13:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-05 12:56 extend the bio alignment check to bio based drivers Christoph Hellwig
2024-07-05 12:56 ` [PATCH 1/2] block: also check bio alignment for " Christoph Hellwig
2024-07-05 13:22   ` Ming Lei
2024-07-05 13:36     ` Christoph Hellwig
2024-07-09 13:50       ` Ming Lei [this message]
2024-07-10  5:53         ` Christoph Hellwig
2024-07-05 13:25   ` John Garry
2024-07-05 13:37     ` Christoph Hellwig
2024-07-05 12:56 ` [PATCH 2/2] brd: remove sector alignment checks Christoph Hellwig

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=Zo1AOKOK7dCpPll2@fedora \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@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 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.