On 08/09/2025 11:56, Christoph Hellwig wrote: Reviewed-by: John Garry <john.g.garry@xxxxxxxxxx>
void bio_init(struct bio *bio, struct block_device *bdev, struct bio_vec *table, unsigned short max_vecs, blk_opf_t opf); +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.
+ bio_init(bio, bdev, bio->bi_inline_vecs, max_vecs, opf); +} extern void bio_uninit(struct bio *);