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-05-04 19:15:35 -07:00
2017-06-01 14:49:47 -04:00
2017-05-05 19:33:07 -07:00
2017-06-06 09:37:44 -07:00
2017-04-27 11:54:49 +01:00
2017-06-11 11:29:15 -07:00
2017-06-12 08:30:13 -06:00
2017-04-17 00:42:22 +02:00
2017-04-20 09:54:24 +02:00
2017-05-09 10:01:15 -07:00
2017-05-04 19:15:35 -07:00
2017-06-11 11:25:51 -07:00
2017-05-18 23:54:47 -07:00
2017-06-04 10:23:25 +02:00
2017-05-05 11:36:44 -07:00
2017-05-11 11:12:26 -07:00