aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-08-30 19:39:19 +0200
committerDavid Sterba <dsterba@suse.com>2019-11-18 23:39:30 +0100
commit1a41802701ec78ca3272073e60463c13b17d121f (patch)
tree7ca183a6711cf98643d22e5778cd9415dd16dc9d /fs/btrfs/relocation.c
parentbtrfs: get bdev directly from fs_devices in submit_extent_page (diff)
downloadlinux-dev-1a41802701ec78ca3272073e60463c13b17d121f.tar.xz
linux-dev-1a41802701ec78ca3272073e60463c13b17d121f.zip
btrfs: drop bio_set_dev where not needed
bio_set_dev sets a bdev to a bio and is not only setting a pointer bug also changing some state bits if there was a different bdev set before. This is one thing that's not needed. Another thing is that setting a bdev at bio allocation time is too early and actually does not work with plain redundancy profiles, where each time we submit a bio to a device, the bdev is set correctly. In many places the bio bdev is set to latest_bdev that seems to serve as a stub pointer "just to put something to bio". But we don't have to do that. Where do we know which bdev to set: * for regular IO: submit_stripe_bio that's called by btrfs_map_bio * repair IO: repair_io_failure, read or write from specific device * super block write (using buffer_heads but uses raw bdev) and barriers * scrub: this does not use all regular IO paths as it needs to reach all copies, verify and fixup eventually, and for that all bdev management is independent * raid56: rbio_add_io_page, for the RMW write * integrity-checker: does it's own low-level block tracking Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
0 files changed, 0 insertions, 0 deletions