projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25e71a9
)
block: merge: get the 1st and last bvec via helpers
author
Ming Lei
<
[email protected]
>
Fri, 26 Feb 2016 15:40:53 +0000
(23:40 +0800)
committer
Jens Axboe
<
[email protected]
>
Thu, 3 Mar 2016 21:42:49 +0000
(14:42 -0700)
This patch applies the two introduced helpers to
figure out the 1st and last bvec.
Reviewed-by: Sagi Grimberg <
[email protected]
>
Reviewed-by: Christoph Hellwig <
[email protected]
>
Signed-off-by: Ming Lei <
[email protected]
>
Signed-off-by: Jens Axboe <
[email protected]
>
block/blk-merge.c
patch
|
blob
|
history
diff --git
a/block/blk-merge.c
b/block/blk-merge.c
index 888a7fec81f715199c3050576516e55b692f2b9b..261353166dcf33a042ea4466ecae044388dddc98 100644
(file)
--- a/
block/blk-merge.c
+++ b/
block/blk-merge.c
@@
-304,7
+304,6
@@
static int blk_phys_contig_segment(struct request_queue *q, struct bio *bio,
struct bio *nxt)
{
struct bio_vec end_bv = { NULL }, nxt_bv;
- struct bvec_iter iter;
if (!blk_queue_cluster(q))
return 0;
@@
-316,11
+315,8
@@
static int blk_phys_contig_segment(struct request_queue *q, struct bio *bio,
if (!bio_has_data(bio))
return 1;
- bio_for_each_segment(end_bv, bio, iter)
- if (end_bv.bv_len == iter.bi_size)
- break;
-
- nxt_bv = bio_iovec(nxt);
+ bio_get_last_bvec(bio, &end_bv);
+ bio_get_first_bvec(nxt, &nxt_bv);
if (!BIOVEC_PHYS_MERGEABLE(&end_bv, &nxt_bv))
return 0;