Re: [PATCH 1/2] block: add a bio_init_inline helper

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

 



On Tue, Sep 09, 2025 at 09:43:55AM +0100, John Garry wrote:
>> +static inline void bio_init_inline(struct bio *bio, struct block_device *bdev,
>> +	      unsigned short max_vecs, blk_opf_t opf)
>> +{
>
> I suppose that a WARN_ON(max_vecs > BIO_MAX_INLINE_VECS) could be added, 
> but I don't think that we generally protect against such self-inflicted 
> programming errors.

It's not needed because there isn't actually any such limit.
BIO_MAX_INLINE_VECS is misnamed and misguided.  Various places in the
block layer require non-passthrough bios to not have more vectors than
BIO_MAX_VECS, while BIO_MAX_INLINE_VECS is a random upper bound for
passthrough I/O without a deeper meaning.





[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