]> git.baikalelectronics.ru Git - kernel.git/commit
block: use bio_clone_fast() in blk_rq_prep_clone()
authorJunichi Nomura <j-nomura@ce.jp.nec.com>
Fri, 3 Oct 2014 21:27:11 +0000 (17:27 -0400)
committerJens Axboe <axboe@fb.com>
Fri, 3 Oct 2014 21:28:16 +0000 (15:28 -0600)
commit2d484015fd11706d4304d492c8a10c1b8ad98df9
treead67b4e5266cf3cd9efdc12e3929f9c95f0b82ff
parentf53b679804a3196d6a6f108e9ab4cf2e93d37aca
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>
block/blk-core.c