ilayout

package
v0.0.0-...-dd0c44f Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package ilayout specifies the "on disk" format of the file system metadata.

The file system heavily leverages package sortedmap to provide a pageable B+Tree metadata system capable of very large inode counts and sizes. Several data structures are also "versioned" to enable gradual modification.

The structure of the file system assumes an underlying object store system (e.g. an S3 Bucket or OpenStack Swift Container) that may or may not support consistency. As such, no Object (or any other numerically identified entity in the file system) is ever written twice except for the CheckPoint described below.

To achieve uniqueness of entities like Object Names, it is expected there is an isomorhic mapping from Object Numbers to/from Object Names. Uniqueness is achieved by utilizing a nonce sequence of 64-bit numbers, starting at zero and incrementing by one. The rate of creation of nonce-identified entities (like Objects) is certainly slow enough such that just remembering the highest nonce utilized is sufficient to ensure no nonce value is ever reused.

Converting a nonce-assigned Object Number to/from an Object Name could be accomplished by simply converting between the 64-bit binary value and the corresponding 16 Hex Digit string. Unfortunately, some solutions (e.g. OpenStack Swift) address the challenge of very large Buckets/Containers via a prefix-based sharding operation. In essence, some string prefix of all Object Names in a particular shard will be common and no Objects Names with that same prefix will be in any other shard. Ideally, once a Bucket/Container has been sharded, new Objects placed in the shards will be evenly distributed (so as to keep each shard roughly the same size baring unbalanced deletions). Hence, the conversion of a slowly monitonically increasing sequence of Object Numbers is best served by reversing the digits in the corresponding Object Names.

At the top level, the file system periodically checkpoints. This enables the file system to be complemented by the extreme scale of such Object Store systems despite such often suffering long latencies and coarse granularity of writes. The CheckPoint is the changing indication of the most recent checkpoint performed. As a default, the CheckPoint is written to a specific Object in the Bucket/Container. This practice violates the safe practice of using an eventually consistent object store, but is provided for cases where the object store can deliver consistency. For deployments where the object store cannot guarantee consistency, the authoritative copy of the CheckPoint should also be written to a consistent store alternative.

From the latest checkpoint, the file system's SuperBlock is located. This SuperBlock is responsible for tracking the location, in the Object Store, of the Inodes (identified by InodeNumber's). This is the first use case for the pageable B+Tree mechanism.

The file system's Inodes are stored in unique Objects. The "tail" of the most recent Object written for the Inode contains the Inode's state (e.g. Mode, UserID, CreationTime, etc...). The Inode's "type" will be either a Directory, a normal File, or a Symbolic Link.

For a Directory Inodes, large directory entry counts call for a second use case for the pageable B+Tree mechanism. Each entry represents a mapping from a "basename" to another Inode in the file system. As an optimization, this mapping also records the InodeType of the refernced Inode. This Directory B+Tree is stored in the same sequence of Objects as that holding the Directory Inode's state.

For normal File Inodes, large amounts of data must be managed. File data is represented as a sequence of "extents" that may be individually modest in size but may be very large in number. This requirement presents the third use case for the pageable B+Tree mechanism. This time, the entries in the ExtentMap B+Tree are mappings from File "offsets" and "extent lengths" to elsewhere in the Object Store objects where the actual File data is held. Both the ExtentMap B+Tree and the File data extents are stored in the same sequence of Objects that hold the File Inode's state.

For Symbolic Link Inodes, there is no need for anything more than the Inode's "state". Here, the "state" adds in the SymLinkTarget.

In addition to structures and constants laying out the file system's "on-disk" format, several marshaling func's are provided to convert between this "on disk" format and an "in memory" equivalent. These func's are both high level (e.g. "superblock") and low level (e.g. uint64) to assist in managing the "on disk" representation of the file system.

Index

Constants

View Source
const (
	InodeTypeDir     uint8 = 0
	InodeTypeFile    uint8 = 1
	InodeTypeSymLink uint8 = 2
)

InodeType* specifies the type of Inode.

View Source
const (
	CheckPointObjectNumber uint64 = 0
)

CheckPointObjectNumber specifies the ObjectNumber of the Object to hold the default/backup copy of the CheckPoint.

View Source
const (
	CheckPointVersionV1 uint64 = 1
)

CheckPointVersionV* specifies the format of the CheckPoint. The CheckPointVersion must always be fetched by scanning the entire CheckPoint using a %016X format specifier. This value will then be used to interpret the remaining characters of the CheckPoint string.

View Source
const (
	InodeHeadType uint16 = 0x4948 // 'I' 'H'
)

InodeHeadType specifies that this ObjectTrailerStruct refers to a InodeHeadV*Struct immediately preceeding it.

View Source
const (
	InodeHeadVersionV1 uint16 = 1
)

InodeHeadVersionV* specifies, for an ObjectTrailerStruct of Type InodeHeadType, the Version of InodeHeadV*Struct immediately preceeding the ObjectTrailerStruct.

View Source
const (
	InodeModeMask uint16 = 0o777
)

InodeModeMask provides a bound on the acceptable values of an Inode's Mode field's protection bits (i.e. rwx bits for each of user, group, and other).

The value is stored in LittleEndian format.

View Source
const (
	InodeTableEntryValueVersionV1 uint64 = 1
)

InodeTableEntryValueVersionV* specifies the format of all following bytes in an InodeTable entry's Value InodeTableEntryStruct.

The value is stored in LittleEndian format.

View Source
const (
	RootDirInodeNumber uint64 = 1
)

RootDirInodeNumber is the InodeNumber for the directory at the root of the file system.

View Source
const (
	SuperBlockType uint16 = 0x5342 // 'S' 'B'
)

SuperBlockType specifies that this ObjectTrailerStruct refers to a SuperBlockV*Struct immediately preceeding it.

View Source
const (
	SuperBlockVersionV1 uint16 = 1
)

SuperBlockVersionV* specifies, for an ObjectTrailerStruct of Type SuperBlockType, the Version of the SuperBlockV*Struct immediately preceeding the ObjectTrailerStruct.

Variables

This section is empty.

Functions

func GetFixedByteSliceFromBuf

func GetFixedByteSliceFromBuf(buf []byte, curPos int, byteSlice []byte) (nextPos int, err error)

GetFixedByteSliceFromBuf fetches a []byte from buf starting at curPos.

The []byte is assumed to have been written with the same length as byteSlice. The returned nextPos indicates where the next field (if any) should be read from.

func GetLEByteSliceFromBuf

func GetLEByteSliceFromBuf(buf []byte, curPos int) (byteSlice []byte, nextPos int, err error)

GetLEByteSliceFromBuf fetches a []byte from buf starting at curPos.

The []byte is assumed to have been written as a LittleEndian byte order uint64 length followed by the bytes that make up the []byte. The returned nextPos indicates where the next field (if any) should be read from.

func GetLEStringFromBuf

func GetLEStringFromBuf(buf []byte, curPos int) (str string, nextPos int, err error)

GetLEStringFromBuf fetches a string from buf starting at curPos.

The string is assumed to have been written as a LittleEndian byte order uint64 length followed by the bytes that make up the string. The returned nextPos indicates where the next field (if any) should be read from.

func GetLEUint16FromBuf

func GetLEUint16FromBuf(buf []byte, curPos int) (u16 uint16, nextPos int, err error)

GetLEUint16FromBuf fetches a uint16 from buf starting at curPos.

The uint16 is assumed to have been written in LittleEndian byte order. The returned nextPos indicates where the next field (if any) should be read from.

func GetLEUint32FromBuf

func GetLEUint32FromBuf(buf []byte, curPos int) (u32 uint32, nextPos int, err error)

GetLEUint32FromBuf fetches a uint32 from buf starting at curPos.

The uint32 is assumed to have been written in LittleEndian byte order. The returned nextPos indicates where the next field (if any) should be read from.

func GetLEUint64FromBuf

func GetLEUint64FromBuf(buf []byte, curPos int) (u64 uint64, nextPos int, err error)

GetLEUint64FromBuf fetches a uint64 from buf starting at curPos.

The uint64 is assumed to have been written in LittleEndian byte order. The returned nextPos indicates where the next field (if any) should be read from.

func GetLEUint8FromBuf

func GetLEUint8FromBuf(buf []byte, curPos int) (u8 uint8, nextPos int, err error)

GetLEUint8FromBuf fetches a uint8 from buf starting at curPos.

The returned nextPos indicates where the next field (if any) should be read from.

func GetObjectNameAsByteSlice

func GetObjectNameAsByteSlice(objectNumber uint64) (objectName []byte)

GetObjectNameAsByteSlice returns the isomorphically mapped objectName as a []byte given a uint64 objectNumber.

func GetObjectNameAsString

func GetObjectNameAsString(objectNumber uint64) (objectName string)

GetObjectNameAsString returns the isomorphically mapped objectName as a string given a uint64 objectNumber.

func GetObjectNumberFromByteSlice

func GetObjectNumberFromByteSlice(objectName []byte) (objectNumber uint64, err error)

GetObjectNumberFromByteSlice returns the isomorphically mapped uint64 objectNumber given a []byte objectName.

An error will result if objectName is not of the proper length or contains invalid characters.

func GetObjectNumberFromString

func GetObjectNumberFromString(objectName string) (objectNumber uint64, err error)

GetObjectNumberFromString returns the isomorphically mapped uint64 objectNumber given a string objectName.

An error will result if objectName is not of the proper length or contains invalid characters.

func PutFixedByteSliceToBuf

func PutFixedByteSliceToBuf(buf []byte, curPos int, byteSlice []byte) (nextPos int, err error)

PutFixedByteSliceToBuf writes a []byte to buf starting at curPos.

The returned nextPost indicates where the next field (if any) should be written.

func PutLEByteSliceToBuf

func PutLEByteSliceToBuf(buf []byte, curPos int, byteSlice []byte) (nextPos int, err error)

PutLEByteSliceToBuf writes a []byte to buf starting at curPos.

The []byte is written as a LittleEndian byte order uint64 length followed by the bytes that make up the []byte. The returned nextPost indicates where the next field (if any) should be written.

func PutLEStringToBuf

func PutLEStringToBuf(buf []byte, curPos int, str string) (nextPos int, err error)

PutLEStringToBuf writes a string to buf starting at curPos.

The string is written as a LittleEndian byte order uint64 length followed by the bytes that make up the string. The returned nextPost indicates where the next field (if any) should be written.

func PutLEUint16ToBuf

func PutLEUint16ToBuf(buf []byte, curPos int, u16 uint16) (nextPos int, err error)

PutLEUint16ToBuf writes a uint16 to buf starting at curPos.

The uint16 is written in LittleEndian byte order. The returned nextPost indicates where the next field (if any) should be written.

func PutLEUint32ToBuf

func PutLEUint32ToBuf(buf []byte, curPos int, u32 uint32) (nextPos int, err error)

PutLEUint32ToBuf writes a uint32 to buf starting at curPos.

The uint32 is written in LittleEndian byte order. The returned nextPost indicates where the next field (if any) should be written.

func PutLEUint64ToBuf

func PutLEUint64ToBuf(buf []byte, curPos int, u64 uint64) (nextPos int, err error)

PutLEUint64ToBuf writes a uint64 to buf starting at curPos.

The uint64 is written in LittleEndian byte order. The returned nextPost indicates where the next field (if any) should be written.

func PutLEUint8ToBuf

func PutLEUint8ToBuf(buf []byte, curPos int, u8 uint8) (nextPos int, err error)

PutLEUint8ToBuf writes a uint8 to buf starting at curPos.

The returned nextPost indicates where the next field (if any) should be written.

func UnmarshalCheckPointVersion

func UnmarshalCheckPointVersion(checkpointString string) (checkPointVersion uint64, err error)

UnmarshalCheckPointVersion extracts checkPointVersion from checkpointString.

func UnmarshalInodeTableEntryValueVersion

func UnmarshalInodeTableEntryValueVersion(inodeTableEntryValueBuf []byte) (inodeTableEntryValueVersion uint64, err error)

UnmarshalInodeTableEntryValueVersion extracts inodeTableEntryValueVersion from inodeTableEntryValueBuf.

Types

type CheckPointV1Struct

type CheckPointV1Struct struct {
	Version                uint64 // == CheckPointVersionV1
	SuperBlockObjectNumber uint64 // Identifies the Object containing the SuperBlock at the end
	SuperBlockLength       uint64 // Total length of the SuperBlock found at the end of the Object indicated by SuperBlockObjectNumber
	ReservedToNonce        uint64 // Ensures all numbers requiring uniqueness (e.g. Object numbers, Inode numbers) are never reused
}

CheckPointV1Struct specifies the format of the CheckPoint as of V1.

The contents of the struct are serialized as space separated fields formatted via %016X numbers.

func UnmarshalCheckPointV1

func UnmarshalCheckPointV1(checkPointV1String string) (checkPointV1 *CheckPointV1Struct, err error)

UnmarshalCheckPointV1 decodes checkPointV1 from checkpointString.

func (*CheckPointV1Struct) MarshalCheckPointV1

func (checkPointV1 *CheckPointV1Struct) MarshalCheckPointV1() (checkPointV1String string, err error)

MarshalCheckPointV1 encodes checkPointV1 to checkpointString.

type DirectoryEntryValueV1Struct

type DirectoryEntryValueV1Struct struct {
	InodeNumber uint64
	InodeType   uint8
}

DirectoryEntryValueV1Struct specifies the format, for an Inode of type InodeTypeDir, of the bytes in a .Payload-identified B+Tree's Value.

The struct is serialized as a sequence of uint* fields in LittleEndian format.

Note that there is no DirectoryEntryKeyV1Struct as it is simply a BaseName string serialized by a uint64 length in LittleEndian format followed by the bytes of the string.

func UnmarshalDirectoryEntryValueV1

func UnmarshalDirectoryEntryValueV1(directoryEntryValueV1Buf []byte) (directoryEntryValueV1 *DirectoryEntryValueV1Struct, bytesConsumed int, err error)

UnmarshalDirectoryEntryValueV1 decodes directoryEntryValueV1 from directoryEntryValueV1Buf.

func (*DirectoryEntryValueV1Struct) MarshalDirectoryEntryValueV1

func (directoryEntryValueV1 *DirectoryEntryValueV1Struct) MarshalDirectoryEntryValueV1() (directoryEntryValueV1Buf []byte, err error)

MarshalDirectoryEntryValueV1 encodes directoryEntryValueV1 to directoryEntryValueV1Buf.

type ExtentMapEntryValueV1Struct

type ExtentMapEntryValueV1Struct struct {
	Length       uint64 // Length of this extent (both in the File and in the Object)
	ObjectNumber uint64 // Identifies the Object containing this extent's data
	ObjectOffset uint64 // Starting offset in the Object of this extent's data
}

ExtentMapEntryValueV1Struct specifies the format, for an Inode of type InodeTypeFile, of the bytes in a .Payload-identified B+Tree's Value.

The struct is serialized as a sequence of uint64 fields in LittleEndian format.

Note that there is no ExtentMapEntryKeyV1Struct as it is simply a FileOffset uint64 serialized in LittleEndian format.

func UnmarshalExtentMapEntryValueV1

func UnmarshalExtentMapEntryValueV1(extentMapEntryValueV1Buf []byte) (extentMapEntryValueV1 *ExtentMapEntryValueV1Struct, bytesConsumed int, err error)

UnmarshalExtentMapEntryValueV1 decodes directoryEntryValueV1 from directoryEntryValueV1Buf.

func (*ExtentMapEntryValueV1Struct) MarshalExtentMapEntryValueV1

func (extentMapEntryValueV1 *ExtentMapEntryValueV1Struct) MarshalExtentMapEntryValueV1() (extentMapEntryValueV1Buf []byte, err error)

MarshalExtentMapEntryValueV1 encodes directoryEntryValueV1 to directoryEntryValueV1Buf.

type InodeHeadLayoutEntryV1Struct

type InodeHeadLayoutEntryV1Struct struct {
	ObjectNumber uint64 //    For DirInode's:
	//                          Identifies the Object containing the page(s) of the Directory B+Tree
	//                        For FileInode's:
	//                          Identifies the Object containing the page(s) of the ExtentMap B+Tree
	//                          as well as the bytes of the File's contents
	BytesWritten    uint64 // Number of bytes written to the Object
	BytesReferenced uint64 // Number of bytes currently referenced in the Object
}

InodeHeadLayoutEntryV1Struct is utilized in both DirInode's and FileInode's. For DirInode's, it specifies the layout of the Directory B+Tree in Objects. For FileInode's, it specifies the layout of the ExtentMap B+Tree as well as the File's contents in Objects. Since any modification of the Inode will result in a fresh InodeHeadStruct being written to a new Object, when BytesReferenced drops to zero, the Object may be deleted.

The struct is serialized as a sequence of LittleEndian formatted fields.

type InodeHeadV1Struct

type InodeHeadV1Struct struct {
	InodeNumber         uint64                         //
	InodeType           uint8                          // One of InodeType*
	LinkTable           []InodeLinkTableEntryStruct    // List of Directory Entry references to this Inode
	Size                uint64                         // Only applicable to File Inodes
	ModificationTime    time.Time                      // In POSIX terms, equivalent to st_mtim: Time of last modification
	StatusChangeTime    time.Time                      // In POSIX terms, equivalent to st_ctim: Time of last status change
	Mode                uint16                         // Must be <= InodeModeMask (Note: does not include InodeType encoding)
	UserID              uint64                         //
	GroupID             uint64                         //
	StreamTable         []InodeStreamTableEntryStruct  // List of Alternate Data Streams for this Inode
	PayloadObjectNumber uint64                         // For Dir & File Inodes, identifies the Object containing the root of the Directory or ExtentMap B+Tree
	PayloadObjectOffset uint64                         // For Dir & File Inodes, starting offset in the Object of the root of the Directory or ExtentMap B+Tree
	PayloadObjectLength uint64                         // For Dir & File Inodes, number of bytes in the Object of the root of the Directory or ExtentMap B+Tree
	SymLinkTarget       string                         // For SymLink Inodes, the target of the link
	Layout              []InodeHeadLayoutEntryV1Struct // For Dir  Inodes, describes the data and space occupied by the Payload-described B+Tree

}

InodeHeadV1Struct specifies the layout of an Inode.

The struct is serializes as a sequence of fields:

For uint* fields, LittleEndian format is used.
For table fields, a uint64 length in LittleEndian format is followed by the serialization
  specified in the table entry struct.
For time.Time fields, a uint64 in LittleEndian is used to hold the UnixNano() equivalent.

Note that the SuperBlockV1Struct.InodeTableRootObjectLength also includes the bytes for holding the ObjectTrailerStruct{ObjType: InodeHeadType, Version: InodeHeadVersionV1} that is appended.

func UnmarshalInodeHeadV1

func UnmarshalInodeHeadV1(inodeHeadV1Buf []byte) (inodeHeadV1 *InodeHeadV1Struct, err error)

UnmarshalInodeHeadV1 decodes inodeHeadV1 from inodeHeadV1Buf.

func (*InodeHeadV1Struct) MarshalInodeHeadV1

func (inodeHeadV1 *InodeHeadV1Struct) MarshalInodeHeadV1() (inodeHeadV1Buf []byte, err error)

MarshalInodeHeadV1 encodes inodeHeadV1 to inodeHeadV1Buf.

type InodeLinkTableEntryStruct

type InodeLinkTableEntryStruct struct {
	ParentDirInodeNumber uint64
	ParentDirEntryName   string
}

InodeLinkTableEntryStruct specifies the layout of an InodeHeadV1Struct.LinkTable's entry.

The struct's uint64 field is serialized in LittleEndian format followed by the struct's string field serialized as a LittleEndian length followed by the bytes of the string.

type InodeStreamTableEntryStruct

type InodeStreamTableEntryStruct struct {
	Name  string
	Value []byte
}

InodeStreamTableEntryStruct specifies the layout of an InodeHeadV1Struct.StreamTable's entry.

The struct is serialized be treating both fields as an array of bytes preceeded by a LittleEndian length.

type InodeTableEntryValueV1Struct

type InodeTableEntryValueV1Struct struct {
	InodeHeadObjectNumber uint64 // Identifies the Object containing InodeHeadV*Struct
	InodeHeadLength       uint64 // Total length of the InodeHead found at the end of the Object indicated by InodeHeadObjectNumber
}

InodeTableEntryValueV1Struct specifies the format of the bytes in the InodeTable entry's Value following InodeTableEntryValueVersionV1.

The struct is serialized as a sequence of LittleEndian formatted fields.

Note that there is no InodeTableEntryKeyV1Struct as it is simply an InodeNumber uint64 serialized in LittleEndian format.

func UnmarshalInodeTableEntryValueV1

func UnmarshalInodeTableEntryValueV1(inodeTableEntryValueV1Buf []byte) (inodeTableEntryValueV1 *InodeTableEntryValueV1Struct, bytesConsumed int, err error)

UnmarshalInodeTableEntryValueV1 decodes inodeTableEntryValueV1 from inodeTableEntryValueV1Buf.

func (*InodeTableEntryValueV1Struct) MarshalInodeTableEntryValueV1

func (inodeTableEntryValueV1 *InodeTableEntryValueV1Struct) MarshalInodeTableEntryValueV1() (inodeTableEntryValueV1Buf []byte, err error)

MarshalInodeTableEntryValueV1 encodes inodeTableEntryValueV1 to inodeTableEntryValueV1Buf.

type InodeTableLayoutEntryV1Struct

type InodeTableLayoutEntryV1Struct struct {
	ObjectNumber    uint64 // Identifies the Object containing the page(s) of the InodeTable B+Tree
	BytesWritten    uint64 // Number of bytes written to the Object
	BytesReferenced uint64 // Number of bytes currently referenced in the Object
}

InodeTableLayoutEntryV1Struct specifies the layout of the InodeTable B+Tree in Objects. Since any modification of the Volume will result in a fresh SuperBlockV1Struct being written to a new Object, when BytesReferenced drops to zero, the Object may be deleted.

The struct is serialized as a sequence of LittleEndian formatted fields.

type ObjectTrailerStruct

type ObjectTrailerStruct struct {
	ObjType uint16
	Version uint16
	Length  uint32
}

ObjectTrailerStruct specifies the layout of a trailer found in each Object that identifies the objType, version, and size of a structure immediately proceeding it.

The struct is serialized as a sequence of LittleEndian formatted fields.

func UnmarshalObjectTrailer

func UnmarshalObjectTrailer(objectTrailerBuf []byte) (objectTrailer *ObjectTrailerStruct, err error)

UnmarshalObjectTrailer decodes objectTrailer from objectTrailerBuf.

Note that the last 8 bytes of objectTrailerBuf are decoded. The entire objectTrailerBuf is expected to contain precisely objectTrailer.Length bytes before the ObjectTrailerStruct.

func (*ObjectTrailerStruct) MarshalObjectTrailer

func (objectTrailer *ObjectTrailerStruct) MarshalObjectTrailer() (objectTrailerBuf []byte, err error)

MarshalObjectTrailer encodes objectTrailer to objectTrailerBuf.

type SuperBlockV1Struct

type SuperBlockV1Struct struct {
	InodeTableRootObjectNumber     uint64                          // Identifies the Object containing the root of the InodeTable
	InodeTableRootObjectOffset     uint64                          // Starting offset in the Object of the root of the InodeTable
	InodeTableRootObjectLength     uint64                          // Number of bytes in the Object of the root of the InodeTable
	InodeTableLayout               []InodeTableLayoutEntryV1Struct // Describes the data and space occupied by the the InodeTable
	InodeObjectCount               uint64                          // Number of Objects holding {Dir|File}Inode Payload-described B+Tree's as well as the FileInode's contents
	InodeBytesWritten              uint64                          // Sum of bytes written              in all Objects holding {Dir|File}Inode Payload-described B+Tree as well as the FileInode's contents
	InodeBytesReferenced           uint64                          // Sum of bytes currently referenced in all Objects holding {Dir|File}Inode Payload-described B+Tree as well as the FileInode's contents
	PendingDeleteObjectNumberArray []uint64                        // List of Objects to be deleted after the this CheckPoint
}

SuperBlockStruct specifies the format of the SuperBlock found at the CheckPointV1Struct.SuperBlockLength trailing bytes of the Object indicated by CheckPointV1Struct.SuperBlockObjectNumber.

The InodeTable is a B+Tree where the Key is the uint64 InodeNumber. The Value is a InodeTableEntryValueV1Struct.

The struct is serialized as a sequence of LittleEndian formatted fields. The InodeTableLayout slice is serialized by a preceeding LittleEndian count of the number of InodeTableLayoutEntryV1Struct's followed by the serialization of each one.

The PendingDeleteObjectNumberArray is serialized as a preceeding LittleEndian count of the number of ObjectNumbers followed by each LittleEndian ObjectNumber.

Note that the CheckPointV1Struct.SuperBlockLength also includes the bytes for holding the ObjectTrailerStruct{ObjType: SuperBlockType, Version: SuperBlockVersionV1} that is appended.

func UnmarshalSuperBlockV1

func UnmarshalSuperBlockV1(superBlockV1Buf []byte) (superBlockV1 *SuperBlockV1Struct, err error)

UnmarshalSuperBlockV1 decodes superBlockV1 from superBlockV1Buf.

func (*SuperBlockV1Struct) MarshalSuperBlockV1

func (superBlockV1 *SuperBlockV1Struct) MarshalSuperBlockV1() (superBlockV1Buf []byte, err error)

MarshalSuperBlockV1 encodes superBlockV1 to superBlockV1Buf.

Jump to

Keyboard shortcuts

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