btrfs: handle device lookup with btrfs_dev_lookup_args
authorJosef Bacik <josef@toxicpanda.com>
Tue, 5 Oct 2021 20:12:42 +0000 (16:12 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jul 2022 14:34:59 +0000 (16:34 +0200)
commit5578b681fbf2b22d61189a2539efd3009518b328
treefb150d47188689aee9d9b8bc383357ecb188857d
parent09674bfd8054b6d3667f7db8489551d3c8c1e3d9
btrfs: handle device lookup with btrfs_dev_lookup_args

[ Upstream commit 562d7b1512f7369a19bca2883e2e8672d78f0481 ]

We have a lot of device lookup functions that all do something slightly
different.  Clean this up by adding a struct to hold the different
lookup criteria, and then pass this around to btrfs_find_device() so it
can do the proper matching based on the lookup criteria.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/dev-replace.c
fs/btrfs/ioctl.c
fs/btrfs/scrub.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h