summaryrefslogtreecommitdiff
path: root/lib/btrfs/btrfsitem/item_extent.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/btrfs/btrfsitem/item_extent.go')
-rw-r--r--lib/btrfs/btrfsitem/item_extent.go18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/btrfs/btrfsitem/item_extent.go b/lib/btrfs/btrfsitem/item_extent.go
index 871ed90..edfef7c 100644
--- a/lib/btrfs/btrfsitem/item_extent.go
+++ b/lib/btrfs/btrfsitem/item_extent.go
@@ -13,8 +13,22 @@ import (
"git.lukeshu.com/btrfs-progs-ng/lib/fmtutil"
)
-// key.objectid = laddr of the extent
-// key.offset = length of the extent
+// Extent items map from regions in the logical address space to
+// regions in a file.
+//
+// Compare with:
+//
+// - Metadata, which are like Extents but without .Info.
+// - FileExtents, which map from regions in a file to regions in the
+// logical address space.
+//
+// An Extent may contain (inline or not) several ExtentDataRef items
+// and/or ShareDataRef items.
+//
+// Key:
+//
+// key.objectid = laddr of the extent
+// key.offset = length of the extent
type Extent struct { // complex EXTENT_ITEM=168
Head ExtentHeader
Info TreeBlockInfo // only if .Head.Flags.Has(EXTENT_FLAG_TREE_BLOCK)