Re: [PATCH V3] blk-mq: add blk_rq_nr_bvec() helper

Jens Axboe
2025-12-03T14:53:11Z

On Tue, 02 Dec 2025 19:58:09 -0800, Chaitanya Kulkarni wrote:
> Add a new helper function blk_rq_nr_bvec() that returns the number of
> bvecs in a request. This count represents the number of iterations
> rq_for_each_bvec() would perform on a request.
>
> Drivers need to pre-allocate bvec arrays before iterating through
> a request's bvecs. Currently, they manually count bvecs using
> rq_for_each_bvec() in a loop, which is repetitive. The new helper
> centralizes this logic.
>
> [...]

Applied, thanks!

[1/1] blk-mq: add blk_rq_nr_bvec() helper
commit: 2b2414f706263fb65dac62d34865b9d6889e9409

Best regards,
--
Jens Axboe