Re: [PATCH v2] md: make md_flush_request() more readable

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

 



On Wed, May 29, 2024 at 02:08:20PM +0800, Yu Kuai wrote:
> 
> submit_bio_noacct
>  if (op_is_flush(bio->bi_opf))
>   if (!test_bit(QUEUE_FLAG_WC, &q->queue_flags))
>    if (!bio_sectors(bio))
>     bio_endio(bio);
> 
> Or will the bi_size to be less than one sector?

bi_size is always aligned to the sector size except for passthrough
command.  So the two versions are 100% equivalent.  bio_sectors just
does a useless shift (which the compiler hopefully optimizes away)





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux