btrfs: add a helper to read the superblock metadata_uuid
stable inclusion from stable-v5.10.197 commit ab90a3930d39579f94b5b22eed7337d81450f162 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I96Q8P Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ab90a3930d39579f94b5b22eed7337d81450f162 -------------------------------- [ Upstream commit 4844c366 ] 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: 6bfe3959 ("btrfs: compare the correct fsid/metadata_uuid in btrfs_validate_super") Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment