summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-08-30 15:42:07 +0200
committerDavid Sterba <dsterba@suse.com>2019-11-18 12:47:01 +0100
commit8530c37a70df71ea8a04fbafabba0b92f4475c6c (patch)
tree2de5f4dc87ba63a5f586dec62ca53fd84b9f4df7 /drivers
parentc3e14909d3b399d49d8dfcf3edbcd5463a7eed6f (diff)
downloadlinux-8530c37a70df71ea8a04fbafabba0b92f4475c6c.tar.bz2
btrfs: get bdev from latest_dev for dio bh_result
To remove use of extent_map::bdev we need to find a replacement, and the latest_bdev is the only one we can use here, because inode::i_bdev and superblock::s_bdev are NULL. The DIO code uses bdev in two places: * to read blocksize to perform alignment checks in do_blockdev_direct_IO, but we do them in btrfs code before any call to DIO * in the following call chain: do_direct_IO get_more_blocks sdio->get_block() <-- this is btrfs_get_blocks_direct subsequently the map_bh->b_dev member is used in clean_bdev_aliases and dio_new_bio to set the bio's bdev to that of the buffer_head. However, because we have provided a submit function dio_bio_submit calls our submission function and ignores the bdev. So it's safe to pass any valid bdev that's used within the filesystem. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions