inode

package
v0.0.0-...-3f81762 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const MaxBlocks uint64 = 511

Maximum size of inode, in blocks.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inode

type Inode struct {
	// contains filtered or unexported fields
}

func Open

func Open(d disk.Disk, addr uint64) *Inode

func (*Inode) Append

func (i *Inode) Append(b disk.Block, allocator *alloc.Allocator) bool

Append adds a block to the inode.

Returns false on failure (if the allocator or inode are out of space)

func (*Inode) Read

func (i *Inode) Read(off uint64) disk.Block

func (*Inode) Size

func (i *Inode) Size() uint64

func (*Inode) UsedBlocks

func (i *Inode) UsedBlocks() []uint64

UsedBlocks returns the addresses allocated to the inode for the purposes of recovery. Assumes full ownership of the inode, so does not lock, and expects the caller to need only temporary access to the returned slice.

Jump to

Keyboard shortcuts

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