Documentation
¶
Index ¶
- Constants
- type MemAttr
- func (memAttr *MemAttr) CopyFromAttr(src *metadata.Attr)
- func (memAttr *MemAttr) CopyToAttr(dst *metadata.Attr)
- func (memAttr *MemAttr) Length() uint64
- func (memAttr *MemAttr) Setattr(ctx context.Context, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno
- func (memAttr *MemAttr) UpdateLength(lens uint64)
- func (memAttr *MemAttr) UpdateLengthIfMore(lens uint64)
- type Page
- type Pool
- func (p *Pool) Fsync(ctx context.Context) error
- func (p *Pool) MemAttr() *MemAttr
- func (p *Pool) Read(ctx context.Context, dest []byte, off int64) (fuse.ReadResult, error)
- func (p *Pool) Setattr(ctx context.Context, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno
- func (p *Pool) TruncateWithLock(ctx context.Context, size uint64) error
- func (p *Pool) Write(ctx context.Context, data []byte, off int64) (uint32, error)
Constants ¶
View Source
const PageSize = 1 << 20
View Source
const PoolSize = 64 << 20
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemAttr ¶
type MemAttr struct {
// contains filtered or unexported fields
}
func NewMemAttr ¶
func (*MemAttr) CopyFromAttr ¶
func (*MemAttr) CopyToAttr ¶
func (*MemAttr) UpdateLength ¶
func (*MemAttr) UpdateLengthIfMore ¶
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
func NewPageWithReader ¶
func (*Page) Fsync ¶
func (p *Page) Fsync(ctx context.Context, source *datasource.DataSource, inode metadata.Ino) error
type Pool ¶
type Pool struct {
*datasource.DataSource
// contains filtered or unexported fields
}
func NewPagePool ¶
func NewPagePool(ctx context.Context, dataSource *datasource.DataSource, inode metadata.Ino) (*Pool, error)
func (*Pool) TruncateWithLock ¶
TruncateWithLock remove/truncate the cache pages which offset larger than size\
Click to show internal directories.
Click to hide internal directories.