From 28549f676e040c96bfae575535dea7e0ecdf0f41 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 11 Feb 2023 22:15:41 -0700 Subject: Change how constants are declared to play nice with godoc Switch to NAME Type = val instead of NAME = Type(val) --- lib/btrfs/btrfsprim/objid.go | 56 ++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'lib/btrfs/btrfsprim/objid.go') diff --git a/lib/btrfs/btrfsprim/objid.go b/lib/btrfs/btrfsprim/objid.go index 8ad290b..5896030 100644 --- a/lib/btrfs/btrfsprim/objid.go +++ b/lib/btrfs/btrfsprim/objid.go @@ -14,45 +14,45 @@ const maxUint64pp = 0x1_00000000_00000000 const ( // The IDs of the various trees - ROOT_TREE_OBJECTID = ObjID(1) // holds pointers to all of the tree roots - EXTENT_TREE_OBJECTID = ObjID(2) // stores information about which extents are in use, and reference counts - CHUNK_TREE_OBJECTID = ObjID(3) // chunk tree stores translations from logical -> physical block numbering - DEV_TREE_OBJECTID = ObjID(4) // stores info about which areas of a given device are in use; one per device - FS_TREE_OBJECTID = ObjID(5) // one per subvolume, storing files and directories - ROOT_TREE_DIR_OBJECTID = ObjID(6) // directory objectid inside the root tree - CSUM_TREE_OBJECTID = ObjID(7) // holds checksums of all the data extents - QUOTA_TREE_OBJECTID = ObjID(8) - UUID_TREE_OBJECTID = ObjID(9) // for storing items that use the UUID_*_KEY - FREE_SPACE_TREE_OBJECTID = ObjID(10) // tracks free space in block groups. - BLOCK_GROUP_TREE_OBJECTID = ObjID(11) // hold the block group items. + ROOT_TREE_OBJECTID ObjID = 1 // holds pointers to all of the tree roots + EXTENT_TREE_OBJECTID ObjID = 2 // stores information about which extents are in use, and reference counts + CHUNK_TREE_OBJECTID ObjID = 3 // chunk tree stores translations from logical -> physical block numbering + DEV_TREE_OBJECTID ObjID = 4 // stores info about which areas of a given device are in use; one per device + FS_TREE_OBJECTID ObjID = 5 // one per subvolume, storing files and directories + ROOT_TREE_DIR_OBJECTID ObjID = 6 // directory objectid inside the root tree + CSUM_TREE_OBJECTID ObjID = 7 // holds checksums of all the data extents + QUOTA_TREE_OBJECTID ObjID = 8 + UUID_TREE_OBJECTID ObjID = 9 // for storing items that use the UUID_*_KEY + FREE_SPACE_TREE_OBJECTID ObjID = 10 // tracks free space in block groups. + BLOCK_GROUP_TREE_OBJECTID ObjID = 11 // hold the block group items. // Objects in the DEV_TREE - DEV_STATS_OBJECTID = ObjID(0) // device stats in the device tree + DEV_STATS_OBJECTID ObjID = 0 // device stats in the device tree // ??? - BALANCE_OBJECTID = ObjID(maxUint64pp - 4) // for storing balance parameters in the root tree - ORPHAN_OBJECTID = ObjID(maxUint64pp - 5) // orphan objectid for tracking unlinked/truncated files - TREE_LOG_OBJECTID = ObjID(maxUint64pp - 6) // does write ahead logging to speed up fsyncs - TREE_LOG_FIXUP_OBJECTID = ObjID(maxUint64pp - 7) - TREE_RELOC_OBJECTID = ObjID(maxUint64pp - 8) // space balancing - DATA_RELOC_TREE_OBJECTID = ObjID(maxUint64pp - 9) - EXTENT_CSUM_OBJECTID = ObjID(maxUint64pp - 10) // extent checksums all have this objectid - FREE_SPACE_OBJECTID = ObjID(maxUint64pp - 11) // For storing free space cache - FREE_INO_OBJECTID = ObjID(maxUint64pp - 12) // stores the inode number for the free-ino cache - - MULTIPLE_OBJECTIDS = ObjID(maxUint64pp - 255) // dummy objectid represents multiple objectids + BALANCE_OBJECTID ObjID = maxUint64pp - 4 // for storing balance parameters in the root tree + ORPHAN_OBJECTID ObjID = maxUint64pp - 5 // orphan objectid for tracking unlinked/truncated files + TREE_LOG_OBJECTID ObjID = maxUint64pp - 6 // does write ahead logging to speed up fsyncs + TREE_LOG_FIXUP_OBJECTID ObjID = maxUint64pp - 7 + TREE_RELOC_OBJECTID ObjID = maxUint64pp - 8 // space balancing + DATA_RELOC_TREE_OBJECTID ObjID = maxUint64pp - 9 + EXTENT_CSUM_OBJECTID ObjID = maxUint64pp - 10 // extent checksums all have this objectid + FREE_SPACE_OBJECTID ObjID = maxUint64pp - 11 // For storing free space cache + FREE_INO_OBJECTID ObjID = maxUint64pp - 12 // stores the inode number for the free-ino cache + + MULTIPLE_OBJECTIDS ObjID = maxUint64pp - 255 // dummy objectid represents multiple objectids // All files have objectids in this range. - FIRST_FREE_OBJECTID = ObjID(256) - LAST_FREE_OBJECTID = ObjID(maxUint64pp - 256) + FIRST_FREE_OBJECTID ObjID = 256 + LAST_FREE_OBJECTID ObjID = maxUint64pp - 256 - FIRST_CHUNK_TREE_OBJECTID = ObjID(256) + FIRST_CHUNK_TREE_OBJECTID ObjID = 256 // Objects in the CHUNK_TREE - DEV_ITEMS_OBJECTID = ObjID(1) + DEV_ITEMS_OBJECTID ObjID = 1 // ??? - EMPTY_SUBVOL_DIR_OBJECTID = ObjID(2) + EMPTY_SUBVOL_DIR_OBJECTID ObjID = 2 ) func (id ObjID) Format(typ ItemType) string { -- cgit v1.2.3-2-g168b