From 7151acadd5efd7e2ad18b07f9e51cf4e203b9c8b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 6 Jun 2022 21:24:23 -0600 Subject: better node reading/writing --- pkg/btrfs/btrfsitem/item_chunk.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'pkg/btrfs/btrfsitem/item_chunk.go') diff --git a/pkg/btrfs/btrfsitem/item_chunk.go b/pkg/btrfs/btrfsitem/item_chunk.go index 8ffc83b..eb3a16d 100644 --- a/pkg/btrfs/btrfsitem/item_chunk.go +++ b/pkg/btrfs/btrfsitem/item_chunk.go @@ -14,15 +14,15 @@ type Chunk struct { // CHUNK_ITEM=228 } type ChunkHeader struct { - Size uint64 `bin:"off=0x0, siz=0x8"` // size of chunk (bytes) - Owner internal.ObjID `bin:"off=0x8, siz=0x8"` // root referencing this chunk (2) - StripeLen uint64 `bin:"off=0x10, siz=0x8"` // stripe length - Type BlockGroupFlags `bin:"off=0x18, siz=0x8"` // type (same as flags for block group?) - IOOptimalAlign uint32 `bin:"off=0x20, siz=0x4"` // optimal io alignment - IOOptimalWidth uint32 `bin:"off=0x24, siz=0x4"` // optimal io width - IOMinSize uint32 `bin:"off=0x28, siz=0x4"` // minimal io size (sector size) - NumStripes uint16 `bin:"off=0x2c, siz=0x2"` // number of stripes - SubStripes uint16 `bin:"off=0x2e, siz=0x2"` // sub stripes + Size uint64 `bin:"off=0x0, siz=0x8"` + Owner internal.ObjID `bin:"off=0x8, siz=0x8"` // root referencing this chunk (always EXTENT_TREE_OBJECTID=2) + StripeLen uint64 `bin:"off=0x10, siz=0x8"` // ??? + Type BlockGroupFlags `bin:"off=0x18, siz=0x8"` + IOOptimalAlign uint32 `bin:"off=0x20, siz=0x4"` + IOOptimalWidth uint32 `bin:"off=0x24, siz=0x4"` + IOMinSize uint32 `bin:"off=0x28, siz=0x4"` // sector size + NumStripes uint16 `bin:"off=0x2c, siz=0x2"` // [ignored-when-writing] + SubStripes uint16 `bin:"off=0x2e, siz=0x2"` // ??? binstruct.End `bin:"off=0x30"` } -- cgit v1.2.3-2-g168b