alloctxn

package
v0.6.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocTxn

type AllocTxn struct {
	Super  *super.FsSuper
	Op     *jrnl.Op
	Balloc *alloc.Alloc
	Ialloc *alloc.Alloc
	// contains filtered or unexported fields
}

func Begin

func Begin(super *super.FsSuper, log *obj.Log, balloc *alloc.Alloc, ialloc *alloc.Alloc) *AllocTxn

func (*AllocTxn) AllocBlock

func (atxn *AllocTxn) AllocBlock() common.Bnum

func (*AllocTxn) AllocINum

func (atxn *AllocTxn) AllocINum() common.Inum

func (*AllocTxn) AssertValidBlock

func (atxn *AllocTxn) AssertValidBlock(blkno common.Bnum)

func (*AllocTxn) FreeBlock

func (atxn *AllocTxn) FreeBlock(blkno common.Bnum)

func (*AllocTxn) FreeINum

func (atxn *AllocTxn) FreeINum(inum common.Inum)

func (*AllocTxn) Id

func (atxn *AllocTxn) Id() *jrnl.Op

Id returns a pointer to the Op for debug printing only

func (*AllocTxn) PostAbort

func (atxn *AllocTxn) PostAbort()

Abort: free allocated inums and bnums. Nothing to do for freed ones, because in-memory state hasn't been updated by freeINum()/freeBlock().

func (*AllocTxn) PostCommit

func (atxn *AllocTxn) PostCommit()

On-disk bitmap has been updated; update in-memory state for free bits

func (*AllocTxn) PreCommit

func (atxn *AllocTxn) PreCommit()

Write allocated/free bits to the on-disk bit maps

func (*AllocTxn) ReadBlock

func (atxn *AllocTxn) ReadBlock(blkno common.Bnum) *buf.Buf

func (*AllocTxn) WriteBits

func (atxn *AllocTxn) WriteBits(nums []uint64, blk uint64, alloc bool)

func (*AllocTxn) ZeroBlock

func (atxn *AllocTxn) ZeroBlock(blkno common.Bnum)

Jump to

Keyboard shortcuts

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