summaryrefslogtreecommitdiff
path: root/ctree.h
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2013-06-26 17:17:55 +0200
committerDavid Sterba <dsterba@suse.cz>2013-08-09 14:32:31 +0200
commit64075c5be95b96f3b986b0bf8f6b8e4d910ef1a0 (patch)
tree034871aa9e842434219ba24b728a83f6a4772500 /ctree.h
parenta54a29a0cd3e46ebd8a73c8ebc3cbbb66aec5d0a (diff)
Btrfs-progs: Support UUID tree and UUID items in btrfs-debug-tree
Support printing these things. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'ctree.h')
-rw-r--r--ctree.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/ctree.h b/ctree.h
index ea5925fa..6f210b8a 100644
--- a/ctree.h
+++ b/ctree.h
@@ -71,6 +71,8 @@ struct btrfs_free_space_ctl;
#define BTRFS_CSUM_TREE_OBJECTID 7ULL
#define BTRFS_QUOTA_TREE_OBJECTID 8ULL
+/* for storing items that use the BTRFS_UUID_KEY* */
+#define BTRFS_UUID_TREE_OBJECTID 9ULL
/* for storing balance parameters in the root tree */
#define BTRFS_BALANCE_OBJECTID -4ULL
@@ -1108,6 +1110,19 @@ struct btrfs_root {
#define BTRFS_DEV_REPLACE_KEY 250
/*
+ * Stores items that allow to quickly map UUIDs to something else.
+ * These items are part of the filesystem UUID tree.
+ * The key is built like this:
+ * (UUID_upper_64_bits, BTRFS_UUID_KEY*, UUID_lower_64_bits).
+ */
+#if BTRFS_UUID_SIZE != 16
+#error "UUID items require BTRFS_UUID_SIZE == 16!"
+#endif
+#define BTRFS_UUID_KEY_SUBVOL 251 /* for UUIDs assigned to subvols */
+#define BTRFS_UUID_KEY_RECEIVED_SUBVOL 252 /* for UUIDs assigned to
+ * received subvols */
+
+/*
* string items are for debugging. They just store a short string of
* data in the FS
*/