btrfs: factor out helper for single device IO check
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Wed, 13 Dec 2023 14:42:56 +0000 (06:42 -0800)
committerDavid Sterba <dsterba@suse.com>
Fri, 15 Dec 2023 22:03:58 +0000 (23:03 +0100)
commit02d05b6416b1f09a877c71c2761b45d1548d8856
tree08dcedf005817baafe883c4016ae966477f7a3ee
parent96c36eaa7730081e5c946819e4dfad0f432c70f7
btrfs: factor out helper for single device IO check

The check in btrfs_map_block() deciding if a particular I/O is targeting a
single device is getting more and more convoluted.

Factor out the check conditions into a helper function, with no functional
change otherwise.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c