diff options
author | David Sterba <dsterba@suse.com> | 2019-08-30 20:39:19 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-11-19 01:39:30 +0300 |
commit | 1a41802701ec78ca3272073e60463c13b17d121f (patch) | |
tree | 7ca183a6711cf98643d22e5778cd9415dd16dc9d /crypto | |
parent | 429aebc0a9a063667dba21244386f96e5b4d7330 (diff) | |
download | linux-1a41802701ec78ca3272073e60463c13b17d121f.tar.xz |
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 'crypto')
0 files changed, 0 insertions, 0 deletions