Versions in this module Expand all Collapse all v0 v0.5.1 Aug 17, 2022 v0.5.0 Jul 14, 2022 Changes in this version + const ALL_UNIT_CLEAR + const ALL_UNIT_SET + const BITS_PER_UNIT + const BITS_PER_UNITSET + const BLOCK_SIZE + const BLOCK_SUFFIX + const DATA_SIZE + const DATA_START + const DELETE_SUFFIX + const HOLE_SIZE + const INDEX_SUFFIX + const INODE_NUM + const INODE_SIZE + const LOG_SIZE + const LOG_START + const MAGIC + const SIZE + const UNITSET_BYTES + const UNITS_PER_UNITSET + const UNIT_BYTES + const UPDATE_SUFFIX + const UPGRADE_FILE_NUM + var ErrInodeLimit = errors.New("tae driver: Too many inodes") + var ErrNoSpace = errors.New("tae driver: No space") + var SegmentFactory file.SegmentFactory + type Allocator interface + Allocate func(len uint64) (uint64, uint64) + CheckAllocations func(start uint32, len uint32) + Free func(start uint32, len uint32) + func NewBitmapAllocator(capacity uint64, pageSize uint32) Allocator + type BitmapAllocator struct + func (b *BitmapAllocator) Allocate(needLen uint64) (uint64, uint64) + func (b *BitmapAllocator) CheckAllocations(start uint32, len uint32) + func (b *BitmapAllocator) Free(start uint32, len uint32) + func (b *BitmapAllocator) Init(capacity uint64, pageSize uint32) + type Driver struct + func (s *Driver) Append(fd *DriverFile, pl []byte) (err error) + func (s *Driver) Destroy() + func (s *Driver) EncodeLogName(name string) string + func (s *Driver) Free(fd *DriverFile) + func (s *Driver) GetInodeSize() uint32 + func (s *Driver) GetName() string + func (s *Driver) GetNodes() map[string]*DriverFile + func (s *Driver) GetPageSize() uint32 + func (s *Driver) Init(name string) (err error) + func (s *Driver) Mount() + func (s *Driver) NewBlockFile(fname string) *DriverFile + func (s *Driver) Open(name string) (err error) + func (s *Driver) PrintLog(name, info string) + func (s *Driver) ReleaseFile(fd *DriverFile) + func (s *Driver) Replay(cache *bytes.Buffer) error + func (s *Driver) Sync() error + func (s *Driver) Unmount() + func (s *Driver) Update(fd *DriverFile, pl []byte, fOffset uint64) error + type DriverFile struct + func (b *DriverFile) Append(offset uint64, data []byte, originSize uint32) (err error) + func (b *DriverFile) Destroy() + func (b *DriverFile) GetExtents() *[]Extent + func (b *DriverFile) GetInode() *Inode + func (b *DriverFile) GetName() string + func (b *DriverFile) GetSegement() *Driver + func (b *DriverFile) Read(data []byte) (n int, err error) + func (b *DriverFile) ReadExtent(offset, length uint32, data []byte) (uint32, error) + func (b *DriverFile) SetCols(cols uint32) + func (b *DriverFile) SetIdxs(idxs uint32) + func (b *DriverFile) SetRows(rows uint32) + func (b *DriverFile) Update(offset uint64, data []byte, fOffset uint32) ([]Extent, error) + type Extent struct + func (ex *Extent) End() uint32 + func (ex *Extent) GetData() *entry + func (ex *Extent) Length() uint32 + func (ex *Extent) Offset() uint32 + type ExtentType uint8 + const APPEND + const UPDATE + type Inode struct + func (i *Inode) GetAlgo() uint8 + func (i *Inode) GetCols() uint32 + func (i *Inode) GetFileSize() int64 + func (i *Inode) GetIdxs() uint32 + func (i *Inode) GetOriginSize() int64 + func (i *Inode) GetRows() uint32 + type Log struct + func (l *Log) Append(file *DriverFile) error + func (l *Log) CoverState(start uint32, state StateType) error + func (l *Log) RemoveInode(file *DriverFile) error + func (l *Log) Replay(cache *bytes.Buffer) error + type StateType uint8 + const REMOVE + const RESIDENT + type SuperBlock struct