Commit cb6eb475 authored by Anand Jain's avatar Anand Jain Committed by David Sterba

btrfs: comment about fsid and metadata_uuid relationship

Add a comment explaining the relationship between fsid and metadata_uuid
in the on-disk superblock and the in-memory struct btrfs_fs_devices.
Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 12468731
......@@ -290,6 +290,15 @@ struct btrfs_fs_devices {
* - Following shall be true at all times:
* - metadata_uuid == btrfs_header::fsid
* - metadata_uuid == btrfs_dev_item::fsid
*
* - Relations between fsid and metadata_uuid in sb and fs_devices:
* - Normal:
* fs_devices->fsid == fs_devices->metadata_uuid == sb->fsid
* sb->metadata_uuid == 0
*
* - When the BTRFS_FEATURE_INCOMPAT_METADATA_UUID flag is set:
* fs_devices->fsid == sb->fsid
* fs_devices->metadata_uuid == sb->metadata_uuid
*/
u8 metadata_uuid[BTRFS_FSID_SIZE];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment