]> git.karo-electronics.de Git - karo-tx-linux.git/commit
pktcdvd: use bio_clone_fast() instead of bio_clone()
authorNeilBrown <neilb@suse.com>
Sun, 18 Jun 2017 04:38:58 +0000 (14:38 +1000)
committerJens Axboe <axboe@kernel.dk>
Sun, 18 Jun 2017 18:40:59 +0000 (12:40 -0600)
commita1d91404cb69daee07282b331ce58c4ab2e7a620
tree0ddb63d64918342bb6429b9041867c4aab549cb3
parent8cb0defbaa8d4778c7474677cbb93d8cd602a2a6
pktcdvd: use bio_clone_fast() instead of bio_clone()

pktcdvd doesn't change the bi_io_vec of the clone bio,
so it is more efficient to use bio_clone_fast(), and not clone
the bi_io_vec.
This requires providing a bio_set, and it is safest to
provide a dedicated bio_set rather than sharing
fs_bio_set, which filesytems use.
This new bio_set, pkt_bio_set, can also be use for the bio_split()
call as the two allocations (bio_clone_fast, and bio_split) are
independent, neither can block a bio allocated by the other.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/pktcdvd.c