summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_main.c
diff options
context:
space:
mode:
authorNeilBrown2017-06-18 06:38:58 +0200
committerJens Axboe2017-06-18 20:40:59 +0200
commitf856dc36b6db4cbe757f95787136087fb37af2af (patch)
tree8aa36bbe56deb1622e4042803fa12d4babd5a632 /drivers/block/drbd/drbd_main.c
parentblock: Improvements to bounce-buffer handling (diff)
downloadkernel-qcow2-linux-f856dc36b6db4cbe757f95787136087fb37af2af.tar.gz
kernel-qcow2-linux-f856dc36b6db4cbe757f95787136087fb37af2af.tar.xz
kernel-qcow2-linux-f856dc36b6db4cbe757f95787136087fb37af2af.zip
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>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
0 files changed, 0 insertions, 0 deletions