diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-06-05 10:02:35 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-06-05 10:02:35 -0600 |
commit | ba31d3a4a48ca96517db50cdfa7d71b7721c5b55 (patch) | |
tree | 2d698bcf1c1442eed0d90650086284a72afa265e /pkg/btrfs/btrfsitem | |
parent | 32840c8b2314164848c30305315eba6907f4acad (diff) |
more
Diffstat (limited to 'pkg/btrfs/btrfsitem')
-rw-r--r-- | pkg/btrfs/btrfsitem/item_blockgroup.go | 9 | ||||
-rw-r--r-- | pkg/btrfs/btrfsitem/items.txt | 1 | ||||
-rw-r--r-- | pkg/btrfs/btrfsitem/items_gen.go | 3 |
3 files changed, 13 insertions, 0 deletions
diff --git a/pkg/btrfs/btrfsitem/item_blockgroup.go b/pkg/btrfs/btrfsitem/item_blockgroup.go index 162adb1..565aae8 100644 --- a/pkg/btrfs/btrfsitem/item_blockgroup.go +++ b/pkg/btrfs/btrfsitem/item_blockgroup.go @@ -1,9 +1,18 @@ package btrfsitem import ( + "lukeshu.com/btrfs-tools/pkg/binstruct" + "lukeshu.com/btrfs-tools/pkg/btrfs/internal" "lukeshu.com/btrfs-tools/pkg/util" ) +type BlockGroup struct { // BLOCK_GROUP_ITEM=192 + Used int64 `bin:"off=0, siz=8"` + ChunkObjectID internal.ObjID `bin:"off=8, siz=8"` + Flags BlockGroupFlags `bin:"off=16, siz=8"` + binstruct.End `bin:"off=24"` +} + type BlockGroupFlags uint64 const ( diff --git a/pkg/btrfs/btrfsitem/items.txt b/pkg/btrfs/btrfsitem/items.txt index 0cca6df..5e9a17d 100644 --- a/pkg/btrfs/btrfsitem/items.txt +++ b/pkg/btrfs/btrfsitem/items.txt @@ -1,3 +1,4 @@ +BLOCK_GROUP_ITEM=192 BlockGroup CHUNK_ITEM=228 Chunk DEV_ITEM=216 Dev DEV_EXTENT=204 DevExtent diff --git a/pkg/btrfs/btrfsitem/items_gen.go b/pkg/btrfs/btrfsitem/items_gen.go index fc894d1..8c51875 100644 --- a/pkg/btrfs/btrfsitem/items_gen.go +++ b/pkg/btrfs/btrfsitem/items_gen.go @@ -9,6 +9,7 @@ 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 @@ -33,6 +34,7 @@ const ( ) 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{}), @@ -56,6 +58,7 @@ var keytype2gotype = map[Type]reflect.Type{ UUID_RECEIVED_SUBVOL_KEY: reflect.TypeOf(UUIDMap{}), } +func (BlockGroup) isItem() {} func (Chunk) isItem() {} func (Dev) isItem() {} func (DevExtent) isItem() {} |