btrfs: sipmlify uuid parameters of alloc_fs_devices()
authorAnand Jain <anand.jain@oracle.com>
Wed, 23 Aug 2023 14:52:13 +0000 (22:52 +0800)
committerDavid Sterba <dsterba@suse.com>
Thu, 12 Oct 2023 14:44:02 +0000 (16:44 +0200)
commitf7361d8c3fc3df524bd17517f37adb619c5f99bb
tree750fab8c21e4e0c16bb858c1237fa7298a61b720
parent01fc062bd0e6e0e06d09c7ce22dc51007dd1afa5
btrfs: sipmlify uuid parameters of alloc_fs_devices()

Among all the callers, only the device_list_add() function uses the
second argument of alloc_fs_devices(). It passes metadata_uuid when
available, otherwise, it passes NULL. And in turn, alloc_fs_devices()
is designed to copy either metadata_uuid or fsid into
fs_devices::metadata_uuid.

So remove the second argument in alloc_fs_devices(), and always copy the
fsid.  In the caller device_list_add() function, we will overwrite it
with metadata_uuid when it is available.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/volumes.c