]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
md: fast clone bio in bio_clone_mddev()
authorMing Lei <tom.leiming@gmail.com>
Tue, 14 Feb 2017 15:29:03 +0000 (23:29 +0800)
committerShaohua Li <shli@fb.com>
Wed, 15 Feb 2017 19:24:54 +0000 (11:24 -0800)
commitd7a1030839d35c04a620e841f406b9b2a8600041
tree293b09d7b92528436daa8953c9202cf669702037
parented7ef732ca9f7d6f42be8df6cc7bf4ace3534af3
md: fast clone bio in bio_clone_mddev()

Firstly bio_clone_mddev() is used in raid normal I/O and isn't
in resync I/O path.

Secondly all the direct access to bvec table in raid happens on
resync I/O except for write behind of raid1, in which we still
use bio_clone() for allocating new bvec table.

So this patch replaces bio_clone() with bio_clone_fast()
in bio_clone_mddev().

Also kill bio_clone_mddev() and call bio_clone_fast() directly, as
suggested by Christoph Hellwig.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/faulty.c
drivers/md/md.c
drivers/md/md.h
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c