summaryrefslogtreecommitdiffstats
path: root/block/blk.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-06-06 12:29:02 +0200
committerJens Axboe <axboe@kernel.dk>2019-06-20 10:29:22 -0600
commite9cd19c0c198aa1c893e142b015fde6da862ed52 (patch)
tree323cfe08f79300ebe2fa72105e4c7f4d6d1c17d5 /block/blk.h
parent14ccb66b3f585b2bc21e7256c96090abed5a512c (diff)
downloadlinux-e9cd19c0c198aa1c893e142b015fde6da862ed52.tar.gz
linux-e9cd19c0c198aa1c893e142b015fde6da862ed52.tar.bz2
linux-e9cd19c0c198aa1c893e142b015fde6da862ed52.zip
block: simplify blk_recalc_rq_segments
Return the segement and let the callers assign them, which makes the code a littler more obvious. Also pass the request instead of q plus bio chain, allowing for the use of rq_for_each_bvec. Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk.h b/block/blk.h
index a1d33cb65842..c62e801b2582 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -211,7 +211,7 @@ struct request *attempt_back_merge(struct request_queue *q, struct request *rq);
struct request *attempt_front_merge(struct request_queue *q, struct request *rq);
int blk_attempt_req_merge(struct request_queue *q, struct request *rq,
struct request *next);
-void blk_recalc_rq_segments(struct request *rq);
+unsigned int blk_recalc_rq_segments(struct request *rq);
void blk_rq_set_mixed_merge(struct request *rq);
bool blk_rq_merge_ok(struct request *rq, struct bio *bio);
enum elv_merge blk_try_merge(struct request *rq, struct bio *bio);