diff options
-rw-r--r-- | pkg/btrfs/Makefile | 2 | ||||
-rw-r--r-- | pkg/btrfs/btrfsitem/items.txt | 18 | ||||
-rw-r--r-- | pkg/btrfs/btrfsitem/items_gen.go | 36 | ||||
-rw-r--r-- | pkg/btrfs/internal/itemtype.go | 36 |
4 files changed, 46 insertions, 46 deletions
diff --git a/pkg/btrfs/Makefile b/pkg/btrfs/Makefile index c79b271..9e1c29e 100644 --- a/pkg/btrfs/Makefile +++ b/pkg/btrfs/Makefile @@ -3,7 +3,7 @@ .DELETE_ON_ERROR: btrfsitem/items.txt: btrfsitem $(wildcard btrfsitem/item_*.go) $(MAKEFILE_LIST) - sed -En 's,^type (\S+) .* // (.*=.*),\1 \2,p' $(sort $(filter btrfsitem/item_%.go,$^)) | while read -r typ keys; do for key in $$keys; do echo "$$key" "$$typ"; done; done >$@ + sed -En 's,^type (\S+) .* // (.*=.*),\1 \2,p' $(filter btrfsitem/item_%.go,$^) | while read -r typ keys; do for key in $$keys; do echo "$$key" "$$typ"; done; done | LC_COLLATE=C sort >$@ files += btrfsitem/items.txt btrfsitem/items_gen.go: btrfsitem/items.txt $(MAKEFILE_LIST) diff --git a/pkg/btrfs/btrfsitem/items.txt b/pkg/btrfs/btrfsitem/items.txt index 5e9a17d..e713a80 100644 --- a/pkg/btrfs/btrfsitem/items.txt +++ b/pkg/btrfs/btrfsitem/items.txt @@ -1,22 +1,22 @@ BLOCK_GROUP_ITEM=192 BlockGroup CHUNK_ITEM=228 Chunk -DEV_ITEM=216 Dev DEV_EXTENT=204 DevExtent -DIR_ITEM=84, DirList +DEV_ITEM=216 Dev DIR_INDEX=96, DirList -XATTR_ITEM=24 DirList -UNTYPED=0, Empty -TREE_BLOCK_REF=176, Empty -SHARED_BLOCK_REF=182, Empty -QGROUP_RELATION=246 Empty -EXTENT_ITEM=168 Extent +DIR_ITEM=84, DirList EXTENT_DATA_REF=178 ExtentDataRef +EXTENT_ITEM=168 Extent INODE_ITEM=1 Inode INODE_REF=12 InodeRefList METADATA_ITEM=169 Metadata ORPHAN_ITEM=48 Orphan PERSISTENT_ITEM=249 DevStats +QGROUP_RELATION=246 Empty ROOT_ITEM=132 Root +SHARED_BLOCK_REF=182, Empty SHARED_DATA_REF=184 SharedDataRef -UUID_SUBVOL=251 UUIDMap +TREE_BLOCK_REF=176, Empty +UNTYPED=0, Empty UUID_RECEIVED_SUBVOL=252 UUIDMap +UUID_SUBVOL=251 UUIDMap +XATTR_ITEM=24 DirList diff --git a/pkg/btrfs/btrfsitem/items_gen.go b/pkg/btrfs/btrfsitem/items_gen.go index 8c51875..063c2e7 100644 --- a/pkg/btrfs/btrfsitem/items_gen.go +++ b/pkg/btrfs/btrfsitem/items_gen.go @@ -11,51 +11,51 @@ import ( const ( BLOCK_GROUP_ITEM_KEY = internal.BLOCK_GROUP_ITEM_KEY CHUNK_ITEM_KEY = internal.CHUNK_ITEM_KEY - DEV_ITEM_KEY = internal.DEV_ITEM_KEY DEV_EXTENT_KEY = internal.DEV_EXTENT_KEY - DIR_ITEM_KEY = internal.DIR_ITEM_KEY + DEV_ITEM_KEY = internal.DEV_ITEM_KEY DIR_INDEX_KEY = internal.DIR_INDEX_KEY - XATTR_ITEM_KEY = internal.XATTR_ITEM_KEY - UNTYPED_KEY = internal.UNTYPED_KEY - TREE_BLOCK_REF_KEY = internal.TREE_BLOCK_REF_KEY - SHARED_BLOCK_REF_KEY = internal.SHARED_BLOCK_REF_KEY - QGROUP_RELATION_KEY = internal.QGROUP_RELATION_KEY - EXTENT_ITEM_KEY = internal.EXTENT_ITEM_KEY + DIR_ITEM_KEY = internal.DIR_ITEM_KEY EXTENT_DATA_REF_KEY = internal.EXTENT_DATA_REF_KEY + EXTENT_ITEM_KEY = internal.EXTENT_ITEM_KEY INODE_ITEM_KEY = internal.INODE_ITEM_KEY INODE_REF_KEY = internal.INODE_REF_KEY METADATA_ITEM_KEY = internal.METADATA_ITEM_KEY ORPHAN_ITEM_KEY = internal.ORPHAN_ITEM_KEY PERSISTENT_ITEM_KEY = internal.PERSISTENT_ITEM_KEY + QGROUP_RELATION_KEY = internal.QGROUP_RELATION_KEY ROOT_ITEM_KEY = internal.ROOT_ITEM_KEY + SHARED_BLOCK_REF_KEY = internal.SHARED_BLOCK_REF_KEY SHARED_DATA_REF_KEY = internal.SHARED_DATA_REF_KEY - UUID_SUBVOL_KEY = internal.UUID_SUBVOL_KEY + TREE_BLOCK_REF_KEY = internal.TREE_BLOCK_REF_KEY + UNTYPED_KEY = internal.UNTYPED_KEY UUID_RECEIVED_SUBVOL_KEY = internal.UUID_RECEIVED_SUBVOL_KEY + UUID_SUBVOL_KEY = internal.UUID_SUBVOL_KEY + XATTR_ITEM_KEY = internal.XATTR_ITEM_KEY ) var keytype2gotype = map[Type]reflect.Type{ BLOCK_GROUP_ITEM_KEY: reflect.TypeOf(BlockGroup{}), CHUNK_ITEM_KEY: reflect.TypeOf(Chunk{}), - DEV_ITEM_KEY: reflect.TypeOf(Dev{}), DEV_EXTENT_KEY: reflect.TypeOf(DevExtent{}), - DIR_ITEM_KEY: reflect.TypeOf(DirList{}), + DEV_ITEM_KEY: reflect.TypeOf(Dev{}), DIR_INDEX_KEY: reflect.TypeOf(DirList{}), - XATTR_ITEM_KEY: reflect.TypeOf(DirList{}), - UNTYPED_KEY: reflect.TypeOf(Empty{}), - TREE_BLOCK_REF_KEY: reflect.TypeOf(Empty{}), - SHARED_BLOCK_REF_KEY: reflect.TypeOf(Empty{}), - QGROUP_RELATION_KEY: reflect.TypeOf(Empty{}), - EXTENT_ITEM_KEY: reflect.TypeOf(Extent{}), + DIR_ITEM_KEY: reflect.TypeOf(DirList{}), EXTENT_DATA_REF_KEY: reflect.TypeOf(ExtentDataRef{}), + EXTENT_ITEM_KEY: reflect.TypeOf(Extent{}), INODE_ITEM_KEY: reflect.TypeOf(Inode{}), INODE_REF_KEY: reflect.TypeOf(InodeRefList{}), METADATA_ITEM_KEY: reflect.TypeOf(Metadata{}), ORPHAN_ITEM_KEY: reflect.TypeOf(Orphan{}), PERSISTENT_ITEM_KEY: reflect.TypeOf(DevStats{}), + QGROUP_RELATION_KEY: reflect.TypeOf(Empty{}), ROOT_ITEM_KEY: reflect.TypeOf(Root{}), + SHARED_BLOCK_REF_KEY: reflect.TypeOf(Empty{}), SHARED_DATA_REF_KEY: reflect.TypeOf(SharedDataRef{}), - UUID_SUBVOL_KEY: reflect.TypeOf(UUIDMap{}), + TREE_BLOCK_REF_KEY: reflect.TypeOf(Empty{}), + UNTYPED_KEY: reflect.TypeOf(Empty{}), UUID_RECEIVED_SUBVOL_KEY: reflect.TypeOf(UUIDMap{}), + UUID_SUBVOL_KEY: reflect.TypeOf(UUIDMap{}), + XATTR_ITEM_KEY: reflect.TypeOf(DirList{}), } func (BlockGroup) isItem() {} diff --git a/pkg/btrfs/internal/itemtype.go b/pkg/btrfs/internal/itemtype.go index c046ea3..cc38d94 100644 --- a/pkg/btrfs/internal/itemtype.go +++ b/pkg/btrfs/internal/itemtype.go @@ -9,52 +9,52 @@ type ItemType uint8 const ( BLOCK_GROUP_ITEM_KEY = ItemType(192) CHUNK_ITEM_KEY = ItemType(228) - DEV_ITEM_KEY = ItemType(216) DEV_EXTENT_KEY = ItemType(204) - DIR_ITEM_KEY = ItemType(84) + DEV_ITEM_KEY = ItemType(216) DIR_INDEX_KEY = ItemType(96) - XATTR_ITEM_KEY = ItemType(24) - UNTYPED_KEY = ItemType(0) - TREE_BLOCK_REF_KEY = ItemType(176) - SHARED_BLOCK_REF_KEY = ItemType(182) - QGROUP_RELATION_KEY = ItemType(246) - EXTENT_ITEM_KEY = ItemType(168) + DIR_ITEM_KEY = ItemType(84) EXTENT_DATA_REF_KEY = ItemType(178) + EXTENT_ITEM_KEY = ItemType(168) INODE_ITEM_KEY = ItemType(1) INODE_REF_KEY = ItemType(12) METADATA_ITEM_KEY = ItemType(169) ORPHAN_ITEM_KEY = ItemType(48) PERSISTENT_ITEM_KEY = ItemType(249) + QGROUP_RELATION_KEY = ItemType(246) ROOT_ITEM_KEY = ItemType(132) + SHARED_BLOCK_REF_KEY = ItemType(182) SHARED_DATA_REF_KEY = ItemType(184) - UUID_SUBVOL_KEY = ItemType(251) + TREE_BLOCK_REF_KEY = ItemType(176) + UNTYPED_KEY = ItemType(0) UUID_RECEIVED_SUBVOL_KEY = ItemType(252) + UUID_SUBVOL_KEY = ItemType(251) + XATTR_ITEM_KEY = ItemType(24) ) func (t ItemType) String() string { names := map[ItemType]string{ BLOCK_GROUP_ITEM_KEY: "BLOCK_GROUP_ITEM", CHUNK_ITEM_KEY: "CHUNK_ITEM", - DEV_ITEM_KEY: "DEV_ITEM", DEV_EXTENT_KEY: "DEV_EXTENT", - DIR_ITEM_KEY: "DIR_ITEM", + DEV_ITEM_KEY: "DEV_ITEM", DIR_INDEX_KEY: "DIR_INDEX", - XATTR_ITEM_KEY: "XATTR_ITEM", - UNTYPED_KEY: "UNTYPED", - TREE_BLOCK_REF_KEY: "TREE_BLOCK_REF", - SHARED_BLOCK_REF_KEY: "SHARED_BLOCK_REF", - QGROUP_RELATION_KEY: "QGROUP_RELATION", - EXTENT_ITEM_KEY: "EXTENT_ITEM", + DIR_ITEM_KEY: "DIR_ITEM", EXTENT_DATA_REF_KEY: "EXTENT_DATA_REF", + EXTENT_ITEM_KEY: "EXTENT_ITEM", INODE_ITEM_KEY: "INODE_ITEM", INODE_REF_KEY: "INODE_REF", METADATA_ITEM_KEY: "METADATA_ITEM", ORPHAN_ITEM_KEY: "ORPHAN_ITEM", PERSISTENT_ITEM_KEY: "PERSISTENT_ITEM", + QGROUP_RELATION_KEY: "QGROUP_RELATION", ROOT_ITEM_KEY: "ROOT_ITEM", + SHARED_BLOCK_REF_KEY: "SHARED_BLOCK_REF", SHARED_DATA_REF_KEY: "SHARED_DATA_REF", - UUID_SUBVOL_KEY: "UUID_KEY_SUBVOL", + TREE_BLOCK_REF_KEY: "TREE_BLOCK_REF", + UNTYPED_KEY: "UNTYPED", UUID_RECEIVED_SUBVOL_KEY: "UUID_KEY_RECEIVED_SUBVOL", + UUID_SUBVOL_KEY: "UUID_KEY_SUBVOL", + XATTR_ITEM_KEY: "XATTR_ITEM", } if name, ok := names[t]; ok { return name |