summaryrefslogtreecommitdiff
path: root/drivers/block/drbd/Makefile
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2017-06-18 14:38:58 +1000
committerJens Axboe <axboe@kernel.dk>2017-06-18 12:40:59 -0600
commitf856dc36b6db4cbe757f95787136087fb37af2af (patch)
tree8aa36bbe56deb1622e4042803fa12d4babd5a632 /drivers/block/drbd/Makefile
parenta8821f3f32bea173c7f9546b3b025898f0e09f58 (diff)
downloadlinux-f856dc36b6db4cbe757f95787136087fb37af2af.tar.gz
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/Makefile')
0 files changed, 0 insertions, 0 deletions