Documentation ¶
Index ¶
- Constants
- Variables
- func ParseError(err error) syscall.Errno
- func ParseType(t uint32) fuseutil.DirentType
- type Handle
- type HandleCache
- type Inode
- type InodeCache
- type OrphanInodeList
- type Super
- func (s *Super) ClusterName() string
- func (s *Super) CreateFile(ctx context.Context, op *fuseops.CreateFileOp) error
- func (s *Super) CreateLink(ctx context.Context, op *fuseops.CreateLinkOp) error
- func (s *Super) CreateSymlink(ctx context.Context, op *fuseops.CreateSymlinkOp) error
- func (s *Super) Destroy()
- func (s *Super) FlushFile(ctx context.Context, op *fuseops.FlushFileOp) error
- func (s *Super) ForgetInode(ctx context.Context, op *fuseops.ForgetInodeOp) error
- func (s *Super) GetInodeAttributes(ctx context.Context, op *fuseops.GetInodeAttributesOp) error
- func (s *Super) GetXattr(ctx context.Context, op *fuseops.GetXattrOp) error
- func (s *Super) InodeGet(ino uint64) (*Inode, error)
- func (s *Super) ListXattr(ctx context.Context, op *fuseops.ListXattrOp) error
- func (s *Super) LookUpInode(ctx context.Context, op *fuseops.LookUpInodeOp) error
- func (s *Super) MkDir(ctx context.Context, op *fuseops.MkDirOp) error
- func (s *Super) MkNode(ctx context.Context, op *fuseops.MkNodeOp) error
- func (s *Super) OpenDir(ctx context.Context, op *fuseops.OpenDirOp) error
- func (s *Super) OpenFile(ctx context.Context, op *fuseops.OpenFileOp) error
- func (s *Super) ReadDir(ctx context.Context, op *fuseops.ReadDirOp) error
- func (s *Super) ReadFile(ctx context.Context, op *fuseops.ReadFileOp) error
- func (s *Super) ReadSymlink(ctx context.Context, op *fuseops.ReadSymlinkOp) error
- func (s *Super) ReleaseDirHandle(ctx context.Context, op *fuseops.ReleaseDirHandleOp) error
- func (s *Super) ReleaseFileHandle(ctx context.Context, op *fuseops.ReleaseFileHandleOp) error
- func (s *Super) RemoveXattr(ctx context.Context, op *fuseops.RemoveXattrOp) error
- func (s *Super) Rename(ctx context.Context, op *fuseops.RenameOp) error
- func (s *Super) RmDir(ctx context.Context, op *fuseops.RmDirOp) error
- func (s *Super) SetInodeAttributes(ctx context.Context, op *fuseops.SetInodeAttributesOp) error
- func (s *Super) SetXattr(ctx context.Context, op *fuseops.SetXattrOp) error
- func (s *Super) StatFS(ctx context.Context, op *fuseops.StatFSOp) error
- func (s *Super) SyncFile(ctx context.Context, op *fuseops.SyncFileOp) error
- func (s *Super) Unlink(ctx context.Context, op *fuseops.UnlinkOp) error
- func (s *Super) WriteFile(ctx context.Context, op *fuseops.WriteFileOp) error
Constants ¶
View Source
const ( DefaultBlksize = uint32(1) << 12 DefaultMaxNameLen = uint32(256) )
View Source
const ( DefaultInodeExpiration = 120 * time.Second MaxInodeCache = 10000000 // in terms of the number of items )
View Source
const ( // MinInodeCacheEvictNum is used in the foreground eviction. // When clearing the inodes from the cache, it stops as soon as 10 inodes have been evicted. MinInodeCacheEvictNum = 10 // MaxInodeCacheEvictNum is used in the back ground. We can evict 200000 inodes at max. MaxInodeCacheEvictNum = 200000 BgEvictionInterval = 2 * time.Minute )
View Source
const (
DeleteExtentsTimeout = 600 * time.Second
)
View Source
const ( // the expiration duration of the dentry in the cache (used internally) DentryValidDuration = 5 * time.Second )
View Source
const (
LogTimeFormat = "20060102150405000"
)
View Source
const (
RootInode = proto.RootIno
)
Variables ¶
View Source
var ( // The following two are used in the FUSE cache // every time the lookup will be performed on the fly, and the result will not be cached LookupValidDuration = 5 * time.Second // the expiration duration of the attributes in the FUSE cache AttrValidDuration = 30 * time.Second )
Functions ¶
Types ¶
type HandleCache ¶
func NewHandleCache ¶
func NewHandleCache() *HandleCache
type Inode ¶
type Inode struct {
// contains filtered or unexported fields
}
Inode defines the structure of an inode.
type InodeCache ¶
InodeCache defines the structure of the inode cache.
func NewInodeCache ¶
func NewInodeCache(exp time.Duration, maxElements int) *InodeCache
NewInodeCache returns a new inode cache.
func (*InodeCache) Delete ¶
func (ic *InodeCache) Delete(ino uint64)
Delete deletes the inode based on the given inode ID.
func (*InodeCache) Get ¶
func (ic *InodeCache) Get(ino uint64) *Inode
Get returns the inode based on the given inode ID.
func (*InodeCache) Put ¶
func (ic *InodeCache) Put(inode *Inode)
Put puts the given inode into the inode cache.
type OrphanInodeList ¶
OrphanInodeList defines the orphan inode list, which is a list of orphan inodes. An orphan inode is the inode whose nlink value is 0.
func NewOrphanInodeList ¶
func NewOrphanInodeList() *OrphanInodeList
NewOrphanInodeList returns a new orphan inode list.
func (*OrphanInodeList) Evict ¶
func (l *OrphanInodeList) Evict(ino uint64) bool
Evict remove the given inode from the orphan inode list, and evicts it.
func (*OrphanInodeList) Put ¶
func (l *OrphanInodeList) Put(ino uint64)
Put puts an inode into the orphan inode list.
type Super ¶
type Super struct {
// contains filtered or unexported fields
}
func (*Super) ClusterName ¶
func (*Super) CreateFile ¶
func (*Super) CreateLink ¶
func (*Super) CreateSymlink ¶
func (*Super) ForgetInode ¶
func (*Super) GetInodeAttributes ¶
func (*Super) LookUpInode ¶
func (*Super) ReadSymlink ¶
func (*Super) ReleaseDirHandle ¶
func (*Super) ReleaseFileHandle ¶
func (*Super) RemoveXattr ¶
func (*Super) SetInodeAttributes ¶
Click to show internal directories.
Click to hide internal directories.