find_device and its helper functions are as below btrfs_find_device_by_devspec() btrfs_find_device_missing_or_by_path() btrfs_find_device_by_path() btrfs_find_device() find_device() Its quite confusing and too fragmented. In this patch-set.. 1/6 and 2/6 -- btrfs_find_device_missing_or_by_path() is collapsed into btrfs_find_device_by_devspec() and cleanup the surviving function. 3/6 -- rename btrfs_find_device_by_path() to find_device_by_superblock(). 4/6 and 5/6 -- collapses find_device() into btrfs_find_device(). 6/6 refactors btrfs_find_device() to return standard error code. Resulting in.. btrfs_find_device(): Mainly used to get struct btrfs_device internally for a given devid and or uuid and also helper function for btrfs_find_device_by_devspec(). btrfs_find_device_by_devspec() and a helper function find_device_by_superblock(): Is mainly to retrieve the struct btrfs_device of a userland given device_path. Anand Jain (6): btrfs: merge btrfs_find_device_missing_or_by_path() into parent btrfs: cleanup btrfs_find_device_by_devspec() btrfs: rename btrfs_find_device_by_path() btrfs: refactor btrfs_find_device() take fs_devices as argument btrfs: merge btrfs_find_device() and find_device() btrfs: refactor btrfs_find_device() return error code fs/btrfs/dev-replace.c | 12 ++-- fs/btrfs/ioctl.c | 9 +-- fs/btrfs/scrub.c | 16 +++-- fs/btrfs/volumes.c | 160 +++++++++++++++++++++---------------------------- fs/btrfs/volumes.h | 5 +- 5 files changed, 93 insertions(+), 109 deletions(-) -- 1.8.3.1
