NeilBrown f856dc36b6 rbd: use bio_clone_fast() instead of bio_clone()
bio_clone() makes a copy of the bi_io_vec, but rbd never changes that,
so there is no need for a copy.
bio_clone_fast() can be used instead, which avoids making the copy.

This requires that we provide a bio_set.  bio_clone() uses fs_bio_set,
but it isn't, in general, safe to use the same bio_set at different
levels of the stack, as that can lead to deadlocks.  As filesystems
use fs_bio_set, block devices shouldn't.

As rbd never stacks, it is safe to have a single global bio_set for
all rbd devices to use.  So allocate that when the module is
initialised, and use it with bio_clone_fast().

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2017-06-18 12:40:59 -06:00
..
2017-06-09 09:27:32 -06:00
2017-05-05 18:49:20 -07:00
2017-02-22 11:54:49 -07:00
2017-02-21 11:51:42 -08:00
2017-06-09 09:27:32 -06:00
2017-05-05 18:49:20 -07:00
2017-06-08 08:40:00 -06:00
2017-04-19 09:10:51 -06:00
2017-06-12 08:30:13 -06:00
2017-02-20 12:16:15 +01:00
2013-11-08 09:10:30 -07:00