summaryrefslogtreecommitdiff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorJunichi Nomura <j-nomura@ce.jp.nec.com>2014-10-04 01:27:11 +0400
committerJens Axboe <axboe@fb.com>2014-10-04 01:28:16 +0400
commit11dfce509eaa35e8fc81cb50d0910c0e235fd7e2 (patch)
treead67b4e5266cf3cd9efdc12e3929f9c95f0b82ff /block/blk-core.c
parent4a0efdc933680d908de11712a774a2c9492c3d5a (diff)
downloadlinux-11dfce509eaa35e8fc81cb50d0910c0e235fd7e2.tar.xz
block: use bio_clone_fast() in blk_rq_prep_clone()
Request cloning clones bios in the request to track the completion of each bio. For that purpose, we can use bio_clone_fast() instead of bio_clone() to avoid unnecessary allocation and copy of bvecs. This patch reduces memory footprint of request-based device-mapper (about 1-4KB for each request) and is a preparation for further reduction of memory usage by removing unused bvec mempool. Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 4aa9ccd02a50..ffcb47af35f3 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2926,7 +2926,7 @@ int blk_rq_prep_clone(struct request *rq, struct request *rq_src,
blk_rq_init(NULL, rq);
__rq_for_each_bio(bio_src, rq_src) {
- bio = bio_clone_bioset(bio_src, gfp_mask, bs);
+ bio = bio_clone_fast(bio_src, gfp_mask, bs);
if (!bio)
goto free_and_out;