diff mbox series

[v2,4/9] btrfs: add comment about metadata_uuid in btrfs_fs_devices

Message ID 4541c4ddf5f49ad5fc3a9d22b5c1e0e17d3f1579.1684928629.git.anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show
Series btrfs: metadata_uuid refactors part1 | expand

Commit Message

Anand Jain May 24, 2023, 12:02 p.m. UTC
Add comment about metadata_uuid in btrfs_fs_devices.
No functional change.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
v2: Fix added code comment style.

 fs/btrfs/volumes.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index 236ae696c984..56633d4f9b31 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -280,7 +280,17 @@  enum btrfs_read_policy {
 
 struct btrfs_fs_devices {
 	u8 fsid[BTRFS_FSID_SIZE]; /* FS specific uuid */
+
+	/*
+	 * UUID written into the btree blocks:
+	 *   If metadata_uuid != fsid then sb must have
+	 *   	BTRFS_FEATURE_INCOMPAT_METADATA_UUID flag set.
+	 *   Following shall be true at all times.
+	 *   	metadata_uuid == btrfs_header::fsid
+	 *   	metadata_uuid == btrfs_dev_item::fsid
+	 */
 	u8 metadata_uuid[BTRFS_FSID_SIZE];
+
 	struct list_head fs_list;
 
 	/*