Documentation ¶
Index ¶
- Constants
- func CreateCopyExtent(fileName string, ID uint64) (string, error)
- type Extent
- func (ex *Extent) AppendBlocks(blocks []block, doSync bool) ([]uint32, uint32, error)
- func (ex *Extent) Close()
- func (ex *Extent) CommitLength() uint32
- func (ex *Extent) GetRawWriter() (*rawWriter, error)
- func (ex *Extent) GetReader() *extentReader
- func (ex *Extent) HasLock(revision int64) bool
- func (ex *Extent) IsSeal() bool
- func (ex *Extent) ReadBlocks(offset uint32, maxNumOfBlocks uint32, maxTotalSize uint32) ([]block, []uint32, uint32, error)
- func (ex *Extent) ReadLastBlock() ([]block, []uint32, uint32, error)
- func (ex *Extent) RecoveryData(start uint32, rev int64, blocks []block) error
- func (ex *Extent) ResetWriter()
- func (ex *Extent) Seal(commit uint32) error
- func (ex *Extent) Sync() error
- func (ex *Extent) Truncate(length uint32) error
- func (ex *Extent) ValidAllBlocks(start int64) (uint32, error)
Constants ¶
View Source
const ( XATTRMETA = "user.EXTENTMETA" XATTRSEAL = "user.XATTRSEAL" XATTRREV = "user.REV" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Extent ¶
type Extent struct { //sync.Mutex //only one AppendBlocks could be called at a time utils.SafeMutex ID uint64 // contains filtered or unexported fields }
func OpenExtent ¶
func (*Extent) AppendBlocks ¶
func (*Extent) CommitLength ¶
func (*Extent) GetRawWriter ¶
fixWriter is used to fill gaps between
func (*Extent) ReadBlocks ¶
func (*Extent) ReadLastBlock ¶
return data, offset, end, error
func (*Extent) RecoveryData ¶
func (*Extent) ResetWriter ¶
func (ex *Extent) ResetWriter()
Click to show internal directories.
Click to hide internal directories.