Skip to content

Conversation

@blktests-ci
Copy link

@blktests-ci blktests-ci bot commented Nov 11, 2025

Pull request for series with
subject: blk-mq: add blk_rq_nr_bvec() helper
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1022178

@blktests-ci
Copy link
Author

blktests-ci bot commented Nov 11, 2025

Upstream branch: e9a6fb0
series: https://patchwork.kernel.org/project/linux-block/list/?series=1022178
version: 1

@blktests-ci
Copy link
Author

blktests-ci bot commented Nov 11, 2025

Upstream branch: e9a6fb0
series: https://patchwork.kernel.org/project/linux-block/list/?series=1022249
version: 2

@blktests-ci blktests-ci bot added V2 and removed V1 labels Nov 11, 2025
@blktests-ci blktests-ci bot force-pushed the series/1022178=>linus-master branch from 7c75abd to 47331e3 Compare November 11, 2025 23:32
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from f699346 to 83d3e2f Compare November 14, 2025 03:26
@blktests-ci
Copy link
Author

blktests-ci bot commented Nov 14, 2025

Upstream branch: 6da43bb
series: https://patchwork.kernel.org/project/linux-block/list/?series=1022249
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1022178=>linus-master branch from 47331e3 to 3460485 Compare November 14, 2025 03:31
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 83d3e2f to 00d5e5c Compare November 16, 2025 07:35
@blktests-ci
Copy link
Author

blktests-ci bot commented Nov 16, 2025

Upstream branch: f824272
series: https://patchwork.kernel.org/project/linux-block/list/?series=1022249
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1022178=>linus-master branch from 3460485 to 2a62137 Compare November 16, 2025 07:40
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 00d5e5c to d782508 Compare November 17, 2025 00:45
@blktests-ci
Copy link
Author

blktests-ci bot commented Nov 17, 2025

Upstream branch: f824272
series: https://patchwork.kernel.org/project/linux-block/list/?series=1022249
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1022178=>linus-master branch from 2a62137 to 9afb527 Compare November 17, 2025 00:49
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from d782508 to 6099a4d Compare November 17, 2025 23:44
@blktests-ci
Copy link
Author

blktests-ci bot commented Nov 17, 2025

Upstream branch: e7c375b
series: https://patchwork.kernel.org/project/linux-block/list/?series=1022249
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1022178=>linus-master branch from 9afb527 to 9aab496 Compare November 17, 2025 23:50
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 6099a4d to 5121c4d Compare November 18, 2025 02:19
@blktests-ci
Copy link
Author

blktests-ci bot commented Nov 18, 2025

Upstream branch: e7c375b
series: https://patchwork.kernel.org/project/linux-block/list/?series=1022249
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1022178=>linus-master branch from 9aab496 to cfc01e6 Compare November 18, 2025 02:24
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 5121c4d to 4458758 Compare November 19, 2025 00:24
@blktests-ci
Copy link
Author

blktests-ci bot commented Nov 19, 2025

Upstream branch: 8b69055
series: https://patchwork.kernel.org/project/linux-block/list/?series=1022249
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1022178=>linus-master branch from cfc01e6 to 1c8f6fb Compare November 19, 2025 00:37
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 4458758 to 6f43942 Compare November 21, 2025 09:45
@blktests-ci
Copy link
Author

blktests-ci bot commented Nov 21, 2025

Upstream branch: fd95357
series: https://patchwork.kernel.org/project/linux-block/list/?series=1022249
version: 2

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.

This pattern exists in loop and zloop drivers, where multi-bio requests
require copying bvecs into a contiguous array before creating
an iov_iter for file operations.

Update loop and zloop drivers to use the new helper, eliminating
duplicate code.

This patch also provides a clear API to avoid any potential misuse of
blk_nr_phys_segments() for calculating the bvecs since, one bvec can
have more than one segments and use of blk_nr_phys_segments() can
lead to extra memory allocation :-

[ 6155.673749] nullb_bio: 128K bio as ONE bvec: sector=0, size=131072
[ 6155.673846] null_blk: #### null_handle_data_transfer:1375
[ 6155.673850] null_blk: nr_bvec=1 blk_rq_nr_phys_segments=2
[ 6155.674263] null_blk: #### null_handle_data_transfer:1375
[ 6155.674267] null_blk: nr_bvec=1 blk_rq_nr_phys_segments=1

Signed-off-by: Chaitanya Kulkarni <[email protected]>
@blktests-ci blktests-ci bot force-pushed the series/1022178=>linus-master branch from 1c8f6fb to 3f564d1 Compare November 21, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants