On Thu, Jan 17, 2019 at 11:32:27PM +0800, Anand Jain wrote: > 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 1,2,4, applied, please update 5 and resend. Thanks.
