Home
last modified time | relevance | path

Searched hist:"6 a501bf0" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/block/
H A Dblk-merge.c6a501bf0 Mon Dec 18 06:22:14 CST 2017 Ming Lei <ming.lei@redhat.com> blk-merge: compute bio->bi_seg_front_size efficiently

It is enough to check and compute bio->bi_seg_front_size just
after the 1st segment is found, but current code checks that
for each bvec, which is inefficient.

This patch follows the way in __blk_recalc_rq_segments()
for computing bio->bi_seg_front_size, and it is more efficient
and code becomes more readable too.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6a501bf0 Mon Dec 18 06:22:14 CST 2017 Ming Lei <ming.lei@redhat.com> blk-merge: compute bio->bi_seg_front_size efficiently

It is enough to check and compute bio->bi_seg_front_size just
after the 1st segment is found, but current code checks that
for each bvec, which is inefficient.

This patch follows the way in __blk_recalc_rq_segments()
for computing bio->bi_seg_front_size, and it is more efficient
and code becomes more readable too.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>