OSDN Git Service

Btrfs: use bio_clone_fast to clone our bio
authorLiu Bo <bo.li.liu@oracle.com>
Tue, 4 Apr 2017 19:23:25 +0000 (12:23 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2017 16:25:58 +0000 (18:25 +0200)
commit015c1bd9f162a00934dd71859f36b12d03c8e771
treeb816eacdb0af239f4e7c4623c8949a0ff9830766
parent7870d0822be99bdb9353b542007c046966ec18f3
Btrfs: use bio_clone_fast to clone our bio

For raid1 and raid10, we clone the original bio to the bios which are then
sent to different disks.

Right now we use bio_clone_bioset to create a clone bio with iterating
bi_io_vec to initialize it.  This changes it to use bio_clone_fast()
which creates a clone bio but only copies the bi_io_vec pointer
instead of iterating bi_io_vec.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c