]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Sep 2023 09:11:08 +0000 (11:11 +0200)
commit31242daa108b9b480371e3f88e945fd720cd38a0
tree41b3cd2c43d16a3dfe6d5dd91587c50e47052cce
parent44751b057c2479508cf3bf2799e6a3e6d296ec22
btrfs: add a helper to read the superblock metadata_uuid

[ Upstream commit 4844c3664a72d36cc79752cb651c78860b14c240 ]

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>
Stable-dep-of: 6bfe3959b0e7 ("btrfs: compare the correct fsid/metadata_uuid in btrfs_validate_super")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/volumes.c
fs/btrfs/volumes.h