btrfs

package
v0.0.0-...-cd18553 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2023 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Magic spells "_BHRfS_M" in little-endian
	Magic = 0x4d5f53665248425f

	// X86RegularPageSize is the size of a regular memory page on X86.
	X86RegularPageSize = 1 << 12

	// DefaultBlockSize is the default block size for BTRFS. It is the size
	// of four pages on x86 (16384 bytes).
	DefaultBlockSize = 4 * X86RegularPageSize
)
View Source
const (
	SuperInfoOffset  = 0x10000         // 64 KiB
	SuperInfoOffset2 = 0x4000000       // 64 MiB
	SuperInfoOffset3 = 0x4000000000    // 256 GiB
	SuperInfoOffset4 = 0x4000000000000 // 1 PiB
)

Offsets of all superblock copies

View Source
const (
	// Holds pointers to all of the tree roots
	RootTreeObjectID = 1

	// Stores information about which extents are in use, and reference
	// counts
	ExtentTreeObjectID = 2

	// The chunk tree stores translations from logical -> physical block
	// numbering the super block points to the chunk tree
	ChunkTreeObjectID = 3

	// Stores information about which areas of a given device are in use. One
	// per device. The tree of tree roots points to the device tree.
	DevTreeObjectID = 4

	// One per subvolume, storing files and directories
	FSTreeObjectID = 5

	// Directory objectid inside the root tree
	RootTreeDirObjectID = 6

	// Holds checksums of all the data extents
	CSumTreeObjectID = 7

	// Holds quota configuration and tracking
	QuotaTreeObjectID = 8

	// For storing items that use the BTRFS_UUID_KEY* types
	UuidTreeObjectID = 9

	// Tracks free space in block groups
	FreeSpaceTreeObjectID = 10

	// Device stats in the device tree
	DevStatsObjectID = 0

	// For storing balance parameters in the root tree
	BalanceObjectID = ^uint64(4) + 1

	// Orphan objectid for tracking unlinked/truncated files
	OrphanObjectID = ^uint64(5) + 1

	// Does write ahead logging to speed up fsyncs
	TreeLogObjectID      = ^uint64(6) + 1
	TreeLogFixupObjectID = ^uint64(7) + 1

	// For space balancing
	TreeRelocObjectID     = ^uint64(8) + 1
	DataRelocTreeObjectID = ^uint64(9) + 1

	// Extent checksums all have this objectid. This allows them to share the
	// logging tree for fsyncs.
	ExtentCSumObjectID = ^uint64(10) + 1

	// For storing free space cache
	FreeSpaceObjectID = ^uint64(11) + 1

	// The inode number assigned to the special inode for storing free inode
	// cache
	FreeInoObjectID = ^uint64(12) + 1

	// Dummy objectid represents multiple objectids
	MultipleObjectIDs = ^uint64(255) + 1

	// All files have objectids in this range
	FirstFreeObjectID = 256
	LastFreeObjectID  = ^uint64(256) + 1

	FirstChunkTreeObjectID = 256

	// The device items go into the chunk tree. The key is in the form
	// [ 1 DevItemKey device_id ]
	DevItemsObjectID = 1

	BtreeInodeObjectID = 1

	EmptySubvolDirObjectID = 2

	// Maximum value of an objectid
	LastObjectID = ^uint64(0)
)

Object ids

View Source
const (
	CSumSize             = 32
	LabelSize            = 256
	SystemChunkArraySize = 2048
)

Entity sizes

View Source
const (
	// Inode items have the data typically returned from stat and store other
	// info about object characteristics. There is one for every file and dir
	// in the FS.
	InodeItemKey = 1

	InodeRefKey    = 12
	InodeExtrefKey = 13
	XAttrItemKey   = 24
	OrphanItemKey  = 48

	// dir items are the name -> inode pointers in a directory. There is one
	// for every name in a directory.
	DirLogItemKey  = 60
	DirLogIndexKey = 72
	DirItemKey     = 84
	DirIndexKey    = 96

	// Extent data is for file data.
	ExtentDataKey = 108

	// Extent csums are stored in a separate tree and hold csums for
	// an entire extent on disk.
	ExtentCSumKey = 128

	// Root items point to tree roots. They are typically in the root
	// tree used by the super block to find all the other trees.
	RootItemKey = 132

	// Root backrefs tie subvols and snapshots to the directory entries that
	// reference them.
	RootBackRefKey = 144

	// Root refs make a fast index for listing all of the snapshots and
	// subvolumes referenced by a given root. They point directly to the
	// directory item in the root that references the subvol.
	RootRefKey = 156

	// Extent items are in the extent map tree. These record which blocks
	// are used, and how many references there are to each block.
	ExtentItemKey = 168

	// The same as the ExtentItemKey, except it's metadata we already know
	// the length, so we save the level in key->offset instead of the
	// length.
	MetadataItemKey = 169

	// These are contained within an extent item.
	// TODO(cblichmann): Parse these
	TreeBlockRefKey   = 176
	ExtentDataRefKey  = 178
	ExtentRefV0Key    = 180
	SharedBlockRefKey = 182
	SharedDataRefKey  = 184

	// Block groups give us hints into the extent allocation trees. Which
	// blocks are free etc.
	BlockGroupItemKey = 192

	// Every block group is represented in the free space tree by a free space
	// info item, which stores some accounting information. It is keyed on
	// (block_group_start, FREE_SPACE_INFO, block_group_length).
	FreeSpaceInfoKey = 198

	// A free space extent tracks an extent of space that is free in a block
	// group. It is keyed on (start, FREE_SPACE_EXTENT, length).
	FreeSpaceExtentKey = 199

	// When a block group becomes very fragmented, we convert it to use bitmaps
	// instead of extents. A free space bitmap is keyed on
	// (start, FREE_SPACE_BITMAP, length); the corresponding item is a bitmap
	// with (length / sectorsize) bits.
	FreeSpaceBitmapKey = 200

	DevExtentKey = 204
	DevItemKey   = 216
	ChunkItemKey = 228

	// Records the overall state of the qgroups.
	// There's only one instance of this key present,
	// (0, BTRFS_QGROUP_STATUS_KEY, 0)
	QgroupStatusKey = 240

	// Records the currently used space of the qgroup.
	// One key per qgroup, (0, BTRFS_QGROUP_INFO_KEY, qgroupid).
	QgroupInfoKey = 242

	// Contains the user configured limits for the qgroup.
	// One key per qgroup, (0, BTRFS_QGROUP_LIMIT_KEY, qgroupid).
	QgroupLimitKey = 244

	// Records the child-parent relationship of qgroups. For each relation, 2
	// keys are present:
	// (childid, BTRFS_QGROUP_RELATION_KEY, parentid)
	// (parentid, BTRFS_QGROUP_RELATION_KEY, childid)
	QgroupRelationKey = 246

	// Obsolete name, see BTRFS_TEMPORARY_ITEM_KEY
	BalanceItemKey = TemporaryItemKey

	// The key type for tree items that are stored persistently, but do not need
	// to exist for extended period of time. The items can exist in any tree.
	//
	// [subtype, BTRFS_TEMPORARY_ITEM_KEY, data]
	//
	// Existing items:
	//
	// - balance status item
	//   (BTRFS_BALANCE_OBJECTID, BTRFS_TEMPORARY_ITEM_KEY, 0)
	TemporaryItemKey = 248

	// Obsolete name, see BTRFS_PERSISTENT_ITEM_KEY
	DevStatsKey = PersistentItemKey

	// The key type for tree items that are stored persistently and usually
	// exist for a long period, eg. filesystem lifetime. The item kinds can be
	// status information, stats or preference values. The item can exist in
	// any tree.
	//
	// [subtype, BTRFS_PERSISTENT_ITEM_KEY, data]
	//
	// Existing items:
	//
	// - device statistics, store IO stats in the device tree, one key for all
	//   stats
	//   (BTRFS_DEV_STATS_OBJECTID, BTRFS_DEV_STATS_KEY, 0)
	PersistentItemKey = 249

	// Persistantly stores the device replace state in the device tree.
	// The key is built like this: (0, BTRFS_DEV_REPLACE_KEY, 0).
	DevReplaceKey = 250

	// Stores items that allow to quickly map UUIDs to something else.
	// These items are part of the filesystem UUID tree.
	// The key is built like this:
	// (UUID_upper_64_bits, BTRFS_UUID_KEY*, UUID_lower_64_bits).
	//
	// For UUIDs assigned to subvols
	UUIDKeySubvol = 251

	// For UUIDs assigned to received subvols
	UUIDKeyReceivedSubvol = 252

	// String items are for debugging. They just store a short string of data
	// in the FS.
	StringItemKey = 253
)

Key types

View Source
const (
	FtUnknown = iota
	FtRegFile
	FtDir
	FtChrdev
	FtBlkdev
	FtFifo
	FtSock
	FtSymlink
	FtXattr
	FtMax
)

Directory item type

View Source
const (
	BlockGroupData = 1 << iota
	BlockGroupSystem
	BlockGroupMetadata
	BlockGroupRaid0
	BlockGroupRaid1
	BlockGroupDup
	BlockGroupRaid10
	BlockGroupRaid5
	BlockGroupRaid6
)
View Source
const (
	FileExtentInline = iota
	FileExtentReg
	FileExtentPreAlloc
)

File extent type

View Source
const (
	ExtentFlagData = 1 << iota
	ExtentFlagTreeBlock
	ExtentFlagFullBackref = 0x80
)

Extent item flags

View Source
const (
	DevExtentLen = devExtentChunkTreeUUID + uuid.UUIDSize
)

Dev extent offsets for parsing from byte slice

View Source
const (
	DevItemLen = devItemFSID + uuid.UUIDSize
)
View Source
const (
	FileExtentItemEnd = fileExtentItemNumBytes + 8
)

FileExtentItem offsets for parsing from byte slice

View Source
const (
	HeaderLen = headerLevel + 1
)

Header offsets for parsing from byte slice

View Source
const (
	InodeItemLen = inodeItemOtime + 12
)

InodeItem offsets for parsing from byte slice

View Source
const (
	ItemLen = itemSize + 4
)
View Source
const KeyLen = 8 + 1 + 8
View Source
const (
	RootItemLen = rootItemReserved + 8*8
)

RootItem offsets for parsing from byte slice

Variables

This section is empty.

Functions

func CheckDeviceSize

func CheckDeviceSize(rs io.ReadSeeker, blockSize uint64) (uint64, error)

func KeyCompare

func KeyCompare(a, b Key) int

KeyCompare compares two BTRFS keys lexicographically. It returns 0 if a==b, -1 if a < b and +1 if a > b.

func KeyTypeString

func KeyTypeString(t uint8) string

func ObjectIDString

func ObjectIDString(id uint64) string

func SliceTimeLE

func SliceTimeLE(b []byte) time.Time

func SliceUUID

func SliceUUID(b []byte) uuid.UUID

func SliceUint16LE

func SliceUint16LE(b []byte) uint16

func SliceUint32LE

func SliceUint32LE(b []byte) uint32

func SliceUint64LE

func SliceUint64LE(b []byte) uint64

Types

type BlockGroupItem

type BlockGroupItem []byte

func (BlockGroupItem) ChunkObjectID

func (i BlockGroupItem) ChunkObjectID() uint64

func (BlockGroupItem) Flags

func (i BlockGroupItem) Flags() uint64

func (BlockGroupItem) Used

func (i BlockGroupItem) Used() uint64

type CSum

type CSum [CSumSize]byte

CSum holds raw checksum bytes

type CSumItem

type CSumItem []byte

func (CSumItem) CSum

func (i CSumItem) CSum() CSum

type Chunk

type Chunk []byte

func (Chunk) IOAlign

func (c Chunk) IOAlign() uint32

IOAlign returns the optimal IO alignment for this chunk

func (Chunk) IOWidth

func (c Chunk) IOWidth() uint32

IOWidth returns the optimal IO width for this chunk

func (Chunk) Length

func (c Chunk) Length() uint64

Length returns the size of this chunk in bytes

func (Chunk) NumStripes

func (c Chunk) NumStripes() uint16

NumStripes returns the number of stripes in this chunk. 2^16 stripes is quite a lot, a second limit is the size of a single item in the btree

func (Chunk) Owner

func (c Chunk) Owner() uint64

Owner returns the ObjectID of the root referencing this chunk

func (Chunk) SectorSize

func (c Chunk) SectorSize() uint32

SectorSize returns the minimal IO size for this chunk

func (Chunk) Stripe

func (c Chunk) Stripe(i uint16) Stripe

Stripe returns the ith stripe of this chunk.

func (Chunk) StripeLen

func (c Chunk) StripeLen() uint64

func (Chunk) SubStripes

func (c Chunk) SubStripes() uint16

Sub stripes only matter for raid10

func (Chunk) Type

func (c Chunk) Type() uint64

Type returns the type of this chunk. Reuses BlockGroupItem's Flags

type DevExtent

type DevExtent []byte

Dev extents record free space on individual devices. The owner field points back to the chunk allocation mapping tree that allocated the extent. The chunk tree uuid field is a way to double check the owner.

func (DevExtent) ChunkObjectID

func (e DevExtent) ChunkObjectID() uint64

func (DevExtent) ChunkOffset

func (e DevExtent) ChunkOffset() uint64

func (DevExtent) ChunkTree

func (e DevExtent) ChunkTree() uint64

func (DevExtent) ChunkTreeUUID

func (e DevExtent) ChunkTreeUUID() uuid.UUID

func (DevExtent) Length

func (e DevExtent) Length() uint64

type DevItem

type DevItem []byte

func (DevItem) Bandwidth

func (i DevItem) Bandwidth() uint8

Bandwidth returns the device bandwidth in range 0-100 where 100 is fastest

func (DevItem) BytesUsed

func (i DevItem) BytesUsed() uint64

BytesUsed returns the number of bytes used

func (DevItem) DevGroup

func (i DevItem) DevGroup() uint32

DevGroup returns grouping information for allocation decisions

func (DevItem) DevID

func (i DevItem) DevID() uint64

DevID returns the internal BTRFS device id

func (DevItem) FSID

func (i DevItem) FSID() uuid.UUID

FSID returns the UUID of the FS that owns this device

func (DevItem) Generation

func (i DevItem) Generation() uint64

Generation returns the expected generation for this device

func (DevItem) IOAlign

func (i DevItem) IOAlign() uint32

IOAlign returns the optimal I/O alignment for this device

func (DevItem) IOWidth

func (i DevItem) IOWidth() uint32

IOWidth returns the optimal I/O width for this device

func (DevItem) SectorSize

func (i DevItem) SectorSize() uint32

SectorSize returns the minimal I/O size for this device

func (DevItem) SeekSpeed

func (i DevItem) SeekSpeed() uint8

SeekSpeed returns the device seek speed in range 0-100 where 100 is fastest

func (DevItem) StartOffset

func (i DevItem) StartOffset() uint64

StartOffset returns the starting byte of this partition on the device. This allows for stripe alignment in the future.

func (DevItem) TotalBytes

func (i DevItem) TotalBytes() uint64

TotalBytes returns the size of the device

func (DevItem) Type

func (i DevItem) Type() uint64

Type returns the type and info about this device

func (DevItem) UUID

func (i DevItem) UUID() uuid.UUID

UUID returns the BTRFS generated UUID for this device

type DirItem

type DirItem []byte

func (DirItem) Data

func (d DirItem) Data() string

func (DirItem) DataLen

func (d DirItem) DataLen() uint16

func (DirItem) IsDir

func (d DirItem) IsDir() bool

func (DirItem) IsSubvolume

func (d DirItem) IsSubvolume() bool

func (DirItem) Location

func (d DirItem) Location() Key

func (DirItem) Name

func (d DirItem) Name() string

func (DirItem) NameLen

func (d DirItem) NameLen() uint16

func (DirItem) TransID

func (d DirItem) TransID() uint64

func (DirItem) Type

func (d DirItem) Type() uint8

type ExtentItem

type ExtentItem []byte

Items in the extent btree are used to record the objectid of the owner of the block and the number of references.

func (ExtentItem) Flags

func (i ExtentItem) Flags() uint64

func (ExtentItem) Generation

func (i ExtentItem) Generation() uint64

func (ExtentItem) IsCompatV0

func (i ExtentItem) IsCompatV0() bool

func (ExtentItem) Refs

func (i ExtentItem) Refs() uint64

type FileExtentItem

type FileExtentItem []byte

func (FileExtentItem) Compression

func (i FileExtentItem) Compression() uint8

32 bits for the various ways we might encode the data, including compression and encryption. If any of these are set to something a given disk format doesn't understand it is treated like an incompat flag for reading and writing, but not for stat.

func (FileExtentItem) Data

func (i FileExtentItem) Data() string

The data returned is only valid if Type == FileExtentInline:

func (FileExtentItem) DiskByteNr

func (i FileExtentItem) DiskByteNr() uint64

func (FileExtentItem) DiskNumBytes

func (i FileExtentItem) DiskNumBytes() uint64

func (FileExtentItem) Encryption

func (i FileExtentItem) Encryption() uint8

func (FileExtentItem) Generation

func (i FileExtentItem) Generation() uint64

Transaction id that created this extent

func (FileExtentItem) IsInline

func (i FileExtentItem) IsInline() bool

func (FileExtentItem) NumBytes

func (i FileExtentItem) NumBytes() uint64

The logical number of file blocks (no csums included). This always reflects the size uncompressed and without encoding.

func (FileExtentItem) Offset

func (i FileExtentItem) Offset() uint64

The logical offset in file blocks (no csums) this extent record is for. This allows a file extent to point into the middle of an existing extent on disk, sharing it between two snapshots (useful if some bytes in the middle of the extent have changed.

func (FileExtentItem) OtherEncoding

func (i FileExtentItem) OtherEncoding() uint16

For later use

func (FileExtentItem) RAMBytes

func (i FileExtentItem) RAMBytes() uint64

Max number of bytes to hold this extent in ram when we split a compressed extent we can't know how big each of the resulting pieces will be. So, this is an upper limit on the size of the extent in ram instead of an exact limit.

func (FileExtentItem) Type

func (i FileExtentItem) Type() uint8

Are we inline data or a real extent?

type Header []byte

func (Header) ByteNr

func (h Header) ByteNr() uint64

ByteNr returns the start of this block relative to the begining of the backing device

func (Header) CSum

func (h Header) CSum() CSum

func (Header) ChunkTreeUUID

func (h Header) ChunkTreeUUID() uuid.UUID

func (Header) FSID

func (h Header) FSID() uuid.UUID

FSID returns the filesystem specific UUID

func (Header) Flags

func (h Header) Flags() uint64

func (Header) Generation

func (h Header) Generation() uint64

func (Header) IsLeaf

func (h Header) IsLeaf() bool

func (Header) Level

func (h Header) Level() uint8

func (Header) NrItems

func (h Header) NrItems() uint32

func (Header) Owner

func (h Header) Owner() uint64

type InodeItem

type InodeItem []byte

func (InodeItem) Atime

func (i InodeItem) Atime() time.Time

func (InodeItem) BlockGroup

func (i InodeItem) BlockGroup() uint64

func (InodeItem) Ctime

func (i InodeItem) Ctime() time.Time

func (InodeItem) Flags

func (i InodeItem) Flags() uint64

func (InodeItem) GID

func (i InodeItem) GID() uint32

func (InodeItem) Generation

func (i InodeItem) Generation() uint64

func (InodeItem) Mode

func (i InodeItem) Mode() uint32

func (InodeItem) Mtime

func (i InodeItem) Mtime() time.Time
func (i InodeItem) Nlink() uint32

func (InodeItem) Rdev

func (i InodeItem) Rdev() uint64

func (InodeItem) Reserved

func (i InodeItem) Reserved() [4]uint64

func (InodeItem) Rtime

func (i InodeItem) Rtime() time.Time

func (InodeItem) Sequence

func (i InodeItem) Sequence() uint64

func (InodeItem) Size

func (i InodeItem) Size() uint64

func (InodeItem) TransID

func (i InodeItem) TransID() uint64

func (InodeItem) UID

func (i InodeItem) UID() uint32

type InodeRefItem

type InodeRefItem []byte

func (InodeRefItem) Index

func (i InodeRefItem) Index() uint64

func (InodeRefItem) Name

func (i InodeRefItem) Name() string

func (InodeRefItem) NameLen

func (i InodeRefItem) NameLen() uint16

type Item

type Item []byte

func (Item) Data

func (i Item) Data() []byte

func (Item) Key

func (i Item) Key() Key

func (Item) Offset

func (i Item) Offset() uint32

func (Item) Size

func (i Item) Size() uint32

type Key

type Key struct {
	ObjectID uint64
	Type     uint8
	Offset   uint64
}

func SliceKey

func SliceKey(b []byte) Key

func (Key) String

func (k Key) String() string

type Leaf

type Leaf []byte

func (Leaf) Data

func (l Leaf) Data(i int) []byte

func (Leaf) Header

func (l Leaf) Header() Header

func (Leaf) Item

func (l Leaf) Item(i int) Item

func (Leaf) Items

func (l Leaf) Items() []Item

func (Leaf) Key

func (l Leaf) Key(i int) Key

func (Leaf) Len

func (l Leaf) Len() int

Len returns the number of items in this leaf.

type ParseBuffer

type ParseBuffer struct {
	binary.ByteOrder
	// contains filtered or unexported fields
}

ParseBuffer is similar to bytes.Buffer, except that it is read-only and can be restarted.

func NewParseBuffer

func NewParseBuffer(buf []byte) *ParseBuffer

func (*ParseBuffer) Cap

func (b *ParseBuffer) Cap() int

func (*ParseBuffer) Len

func (b *ParseBuffer) Len() int

func (*ParseBuffer) Next

func (b *ParseBuffer) Next(n int) []byte

Next returns a slice containing the next n bytes from the buffer and advancing it. Panics if there are fewer than n bytes in the buffer. The slice is only valid until the next call to one of the next methods.

func (*ParseBuffer) NextTime

func (b *ParseBuffer) NextTime() time.Time

func (*ParseBuffer) NextUint16

func (b *ParseBuffer) NextUint16() uint16

func (*ParseBuffer) NextUint32

func (b *ParseBuffer) NextUint32() uint32

func (*ParseBuffer) NextUint64

func (b *ParseBuffer) NextUint64() uint64

func (*ParseBuffer) NextUint8

func (b *ParseBuffer) NextUint8() uint8

func (*ParseBuffer) Offset

func (b *ParseBuffer) Offset() int

func (*ParseBuffer) Rewind

func (b *ParseBuffer) Rewind()

func (*ParseBuffer) SetOffset

func (b *ParseBuffer) SetOffset(offset int)

func (*ParseBuffer) Unread

func (b *ParseBuffer) Unread() int

type RootItem

type RootItem []byte

func (RootItem) ByteLimit

func (i RootItem) ByteLimit() uint64

func (RootItem) ByteNr

func (i RootItem) ByteNr() uint64

func (RootItem) BytesUsed

func (i RootItem) BytesUsed() uint64

func (RootItem) CTransID

func (i RootItem) CTransID() uint64

Updated when an inode changes

func (RootItem) Ctime

func (i RootItem) Ctime() time.Time

func (RootItem) DropLevel

func (i RootItem) DropLevel() uint8

func (RootItem) DropProgress

func (i RootItem) DropProgress() Key

func (RootItem) Flags

func (i RootItem) Flags() uint64

func (RootItem) Generation

func (i RootItem) Generation() uint64

func (RootItem) GenerationV2

func (i RootItem) GenerationV2() uint64

This generation number is used to test if the new fields are valid and up to date while reading the root item. Everytime the root item is written out, the "generation" field is copied into this field. If anyone ever mounted the fs with an older kernel, we will have mismatching generation values here and thus must invalidate the new fields.

func (RootItem) Inode

func (i RootItem) Inode() InodeItem

func (RootItem) IsGenerationV2

func (i RootItem) IsGenerationV2() bool

func (RootItem) LastSnapshot

func (i RootItem) LastSnapshot() uint64

func (RootItem) Level

func (i RootItem) Level() uint8

func (RootItem) OTransID

func (i RootItem) OTransID() uint64

Trans when created

func (RootItem) Otime

func (i RootItem) Otime() time.Time

func (RootItem) ParentUUID

func (i RootItem) ParentUUID() uuid.UUID

func (RootItem) RTransID

func (i RootItem) RTransID() uint64

Trans when received. Non-zero for received subvol

func (RootItem) ReceivedUUID

func (i RootItem) ReceivedUUID() uuid.UUID

func (RootItem) Refs

func (i RootItem) Refs() uint32

func (RootItem) Reserved

func (i RootItem) Reserved() [8]uint64

func (RootItem) RootDirID

func (i RootItem) RootDirID() uint64

func (RootItem) Rtime

func (i RootItem) Rtime() time.Time

func (RootItem) STransID

func (i RootItem) STransID() uint64

Trans when sent. Non-zero for received subvol

func (RootItem) Stime

func (i RootItem) Stime() time.Time

func (RootItem) UUID

func (i RootItem) UUID() uuid.UUID

type RootRef

type RootRef []byte

This is used for both forward and backward root refs

func (RootRef) DirID

func (r RootRef) DirID() uint64

func (RootRef) Name

func (r RootRef) Name() string

func (RootRef) NameLen

func (r RootRef) NameLen() uint16

func (RootRef) Sequence

func (r RootRef) Sequence() uint64

type Stripe

type Stripe []byte

func (Stripe) DevID

func (s Stripe) DevID() uint64

func (Stripe) DevUUID

func (s Stripe) DevUUID() uuid.UUID

func (Stripe) Offset

func (s Stripe) Offset() uint64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL