Documentation ¶
Index ¶
- Constants
- func CreateCopyExtent(fileName string, ID uint64) (string, error)
- func ExtractEntryInfo(b *pb.Block, extentID uint64, offset uint32, replay bool) (*pb.EntryInfo, error)
- type Extent
- func (ex *Extent) AppendBlocks(blocks []*pb.Block, doSync bool) ([]uint32, uint32, error)
- func (ex *Extent) Close()
- func (ex *Extent) CommitLength() uint32
- func (ex *Extent) GetRawWriter() *rawWriter
- 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) ([]*pb.Block, []uint32, uint32, error)
- func (ex *Extent) ReadEntries(offset uint32, maxTotalSize uint32, replay bool) ([]*pb.EntryInfo, uint32, error)
- func (ex *Extent) RecoveryData(start uint32, rev int64, blocks []*pb.Block) error
- func (ex *Extent) ResetWriter() error
- func (ex *Extent) Seal(commit uint32) error
- func (ex *Extent) Sync()
- 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 ¶
func (ex *Extent) GetRawWriter() *rawWriter
fixWriter is used to fill gaps between
func (*Extent) ReadBlocks ¶
func (*Extent) ReadEntries ¶
func (ex *Extent) ReadEntries(offset uint32, maxTotalSize uint32, replay bool) ([]*pb.EntryInfo, uint32, error)
helper function, block could be pb.Entries, support ReadEntries ReadEntries can only be called on replicated extent node_service will never call this function, this function is only for test
func (*Extent) RecoveryData ¶
func (*Extent) ResetWriter ¶
Click to show internal directories.
Click to hide internal directories.