Re: [PATCH] block: check bio alignment in blk_mq_submit_bio

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

 



On Wed, Jun 19, 2024 at 01:06:32AM -0700, Christoph Hellwig wrote:
> On Wed, Jun 19, 2024 at 03:58:37PM +0800, Ming Lei wrote:
> > > > 	unsigned int bs_mask = queue_logical_block_size(q) - 1;
> > > 
> > > Please avoid use of the queue helpers.  This should be:
> > > 
> > > 	unsigned int bs_mask = bdev_logical_block_size(bio->bi_bdev);
> >  
> > It is one blk-mq internal helper, I think queue helper is more
> > efficient since it is definitely in fast path.
> 
> Does it actually generate different code for you with all the inlining
> modern compilers do?
 
It is hard to answer, cause there are so many compilers(versions).

I definitely agree bdev_logical_block_size() should be used in external
users, but it is fine to use queue helper in block internal functions.


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