fstxn

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ICACHESZ uint64 = 100

Variables

This section is empty.

Functions

This section is empty.

Types

type FsState

type FsState struct {
	Super   *super.FsSuper
	Txn     *obj.Log
	Icache  *cache.Cache
	Lockmap *lockmap.LockMap
	Balloc  *alloc.Alloc
	Ialloc  *alloc.Alloc
}

func MkFsState

func MkFsState(super *super.FsSuper, log *obj.Log) *FsState

type FsTxn

type FsTxn struct {
	Fs   *FsState
	Atxn *alloctxn.AllocTxn
	// contains filtered or unexported fields
}

func Begin

func Begin(fsstate *FsState) *FsTxn

func (*FsTxn) Abort

func (op *FsTxn) Abort() bool

An aborted transaction may free an inode, which results in dirty buffers that need to be written to log. So, call commit.

func (*FsTxn) AllocInode

func (op *FsTxn) AllocInode(kind nfstypes.Ftype3) *inode.Inode

func (*FsTxn) Commit

func (op *FsTxn) Commit() bool

func (*FsTxn) CommitData

func (op *FsTxn) CommitData() bool

Commit data, but will also commit everything else, since we don't support log-by-pass writes.

func (*FsTxn) CommitFh

func (op *FsTxn) CommitFh() bool

Flush log. We don't have to flush data from other file handles, but that is only an option if we do log-by-pass writes.

func (*FsTxn) CommitUnstable

func (op *FsTxn) CommitUnstable() bool

Commit transaction, but don't write to stable storage

func (*FsTxn) GetInodeFh

func (op *FsTxn) GetInodeFh(fh3 nfstypes.Nfs_fh3) *inode.Inode

func (*FsTxn) GetInodeInum

func (op *FsTxn) GetInodeInum(inum common.Inum) *inode.Inode

func (*FsTxn) GetInodeInumFree

func (op *FsTxn) GetInodeInumFree(inum common.Inum) *inode.Inode

func (*FsTxn) GetInodeLocked

func (op *FsTxn) GetInodeLocked(inum common.Inum) *inode.Inode

func (*FsTxn) GetInodeUnlocked

func (op *FsTxn) GetInodeUnlocked(inum common.Inum) *inode.Inode

Assumes caller already has inode locked

func (*FsTxn) LockInode

func (op *FsTxn) LockInode(inum common.Inum) *cache.Cslot

func (*FsTxn) OwnInum

func (op *FsTxn) OwnInum(inum common.Inum) bool

func (*FsTxn) ReleaseInode

func (op *FsTxn) ReleaseInode(ip *inode.Inode)

Jump to

Keyboard shortcuts

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