Re: [PATCH 1/2] block: also check bio alignment for bio based drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux