summaryrefslogtreecommitdiff
path: root/lib/btrfs/btrfsitem/item_fileextent.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-03-17 01:46:40 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2023-03-17 02:51:43 -0400
commitc30c43f3690931218b88680b337d11a57a2fdc45 (patch)
treea682afa37eaa5a5cee8f8b7a587edc7a40372355 /lib/btrfs/btrfsitem/item_fileextent.go
parente082cfb3b8f8226067078cc410e4997fd1cf14df (diff)
tree-wide: Ensure that all existing type doc comments follow the expected format
This is a notable improvement in the docs for btrfsitem.
Diffstat (limited to 'lib/btrfs/btrfsitem/item_fileextent.go')
-rw-r--r--lib/btrfs/btrfsitem/item_fileextent.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/btrfs/btrfsitem/item_fileextent.go b/lib/btrfs/btrfsitem/item_fileextent.go
index 6b08897..df3d371 100644
--- a/lib/btrfs/btrfsitem/item_fileextent.go
+++ b/lib/btrfs/btrfsitem/item_fileextent.go
@@ -12,8 +12,19 @@ import (
"git.lukeshu.com/btrfs-progs-ng/lib/btrfs/btrfsvol"
)
-// key.objectid = inode
-// key.offset = offset within file
+// FileExtent items map from regions in a file to regions in the
+// logical address space.
+//
+// Compare with:
+//
+// - Extents, which map from regions in the logical address space to
+// regions in a file.
+// - Metadata, which are like Extents but without .Info.
+//
+// Key:
+//
+// key.objectid = inode
+// key.offset = offset within file
type FileExtent struct { // complex EXTENT_DATA=108
Generation btrfsprim.Generation `bin:"off=0x0, siz=0x8"` // transaction ID that created this extent
RAMBytes int64 `bin:"off=0x8, siz=0x8"` // upper bound of what compressed data will decompress to