btrfs: add a helper to read the superblock metadata_uuid
authorAnand Jain <anand.jain@oracle.com>
Mon, 31 Jul 2023 11:16:32 +0000 (19:16 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Aug 2023 12:54:48 +0000 (14:54 +0200)
commit4844c3664a72d36cc79752cb651c78860b14c240
treeb5f589102b8fefa97abab40da23277689853e3b4
parent182741d287fb1ea870ee6ef45aa1915a0b031233
btrfs: add a helper to read the superblock metadata_uuid

In some cases, we need to read the FSID from the superblock when the
metadata_uuid is not set, and otherwise, read the metadata_uuid. So,
add a helper.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Tested-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
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/volumes.c
fs/btrfs/volumes.h