models

package
v0.0.0-...-9eadeab Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SectorUnit Sector is a linux constant, which is always 512, no matter how big your sectors or blocks
	// are. Please be careful since the terminology is ambiguous. source: https://github.com/asch/bs3/blob/master/internal/bs3/bs3.go
	SectorUnit = int64(512)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Extent

type Extent struct {
	// Start offset on the disk (in bytes)
	Offset int64

	// Length of the extent in bytes. Extent is continuous.
	Length int64
}

type Write

type Write struct {
	Ext WriteExtent
	Buf []byte
}

type WriteExtent

type WriteExtent struct {
	Extent

	// Sequential number of write which wrote this extent
	SeqNo int64

	// Reserved for future usage.
	Flag int64
}

WriteExtent Logical extent representation of the write message.

func ParseExtent

func ParseExtent(b []byte, blockSize int64) (WriteExtent, error)

ParseExtent Parses write extent information from 32 bytes of raw memory. The memory is one write in metadata section of the object.

Jump to

Keyboard shortcuts

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