Documentation ¶
Index ¶
- Constants
- func Backup(m meta.Meta, blob object.ObjectStorage, interval time.Duration)
- func Compact(conf chunk.Config, store chunk.ChunkStore, slices []meta.Slice, id uint64) error
- func GetInternalNodeByName(name string) (Ino, *Attr)
- func InitMetrics(registerer prometheus.Registerer)
- func IsSpecialName(name string) bool
- func IsSpecialNode(ino Ino) bool
- type Attr
- type Config
- type Context
- type DataReader
- type DataWriter
- type Entry
- type FileReader
- type FileWriter
- type Ino
- type LogContext
- type Statfs
- type VFS
- func (v *VFS) Access(ctx Context, ino Ino, mask int) (err syscall.Errno)
- func (v *VFS) CopyFileRange(ctx Context, nodeIn Ino, fhIn, offIn uint64, nodeOut Ino, ...) (copied uint64, err syscall.Errno)
- func (v *VFS) Create(ctx Context, parent Ino, name string, mode uint16, cumask uint16, flags uint32) (entry *meta.Entry, fh uint64, err syscall.Errno)
- func (v *VFS) Fallocate(ctx Context, ino Ino, mode uint8, off, length int64, fh uint64) (err syscall.Errno)
- func (v *VFS) Flock(ctx Context, ino Ino, fh uint64, owner uint64, typ uint32, block bool) (err syscall.Errno)
- func (v *VFS) Flush(ctx Context, ino Ino, fh uint64, lockOwner uint64) (err syscall.Errno)
- func (v *VFS) Fsync(ctx Context, ino Ino, datasync int, fh uint64) (err syscall.Errno)
- func (v *VFS) GetAttr(ctx Context, ino Ino, opened uint8) (entry *meta.Entry, err syscall.Errno)
- func (v *VFS) GetXattr(ctx Context, ino Ino, name string, size uint32) (value []byte, err syscall.Errno)
- func (v *VFS) Getlk(ctx Context, ino Ino, fh uint64, owner uint64, start, len *uint64, typ *uint32, ...) (err syscall.Errno)
- func (v *VFS) Link(ctx Context, ino Ino, newparent Ino, newname string) (entry *meta.Entry, err syscall.Errno)
- func (v *VFS) ListXattr(ctx Context, ino Ino, size int) (data []byte, err syscall.Errno)
- func (v *VFS) Lookup(ctx Context, parent Ino, name string) (entry *meta.Entry, err syscall.Errno)
- func (v *VFS) Mkdir(ctx Context, parent Ino, name string, mode uint16, cumask uint16) (entry *meta.Entry, err syscall.Errno)
- func (v *VFS) Mknod(ctx Context, parent Ino, name string, mode uint16, cumask uint16, rdev uint32) (entry *meta.Entry, err syscall.Errno)
- func (v *VFS) ModifiedSince(ino Ino, start time.Time) bool
- func (v *VFS) Open(ctx Context, ino Ino, flags uint32) (entry *meta.Entry, fh uint64, err syscall.Errno)
- func (v *VFS) Opendir(ctx Context, ino Ino) (fh uint64, err syscall.Errno)
- func (v *VFS) Read(ctx Context, ino Ino, buf []byte, off uint64, fh uint64) (n int, err syscall.Errno)
- func (v *VFS) Readdir(ctx Context, ino Ino, size uint32, off int, fh uint64, plus bool) (entries []*meta.Entry, readAt time.Time, err syscall.Errno)
- func (v *VFS) Readlink(ctx Context, ino Ino) (path []byte, err syscall.Errno)
- func (v *VFS) Release(ctx Context, ino Ino, fh uint64)
- func (v *VFS) ReleaseHandler(ino Ino, fh uint64)
- func (v *VFS) Releasedir(ctx Context, ino Ino, fh uint64) int
- func (v *VFS) RemoveXattr(ctx Context, ino Ino, name string) (err syscall.Errno)
- func (v *VFS) Rename(ctx Context, parent Ino, name string, newparent Ino, newname string, ...) (err syscall.Errno)
- func (v *VFS) Rmdir(ctx Context, parent Ino, name string) (err syscall.Errno)
- func (v *VFS) SetAttr(ctx Context, ino Ino, set int, opened uint8, mode, uid, gid uint32, ...) (entry *meta.Entry, err syscall.Errno)
- func (v *VFS) SetXattr(ctx Context, ino Ino, name string, value []byte, flags uint32) (err syscall.Errno)
- func (v *VFS) Setlk(ctx Context, ino Ino, fh uint64, owner uint64, start, end uint64, typ uint32, ...) (err syscall.Errno)
- func (v *VFS) StatFS(ctx Context, ino Ino) (st *Statfs, err syscall.Errno)
- func (v *VFS) Symlink(ctx Context, path string, parent Ino, name string) (entry *meta.Entry, err syscall.Errno)
- func (v *VFS) Truncate(ctx Context, ino Ino, size int64, opened uint8, attr *Attr) (err syscall.Errno)
- func (v *VFS) Unlink(ctx Context, parent Ino, name string) (err syscall.Errno)
- func (v *VFS) UpdateLength(inode Ino, attr *meta.Attr)
- func (v *VFS) Write(ctx Context, ino Ino, buf []byte, off, fh uint64) (err syscall.Errno)
Constants ¶
View Source
const ( MODE_MASK_R = 4 MODE_MASK_W = 2 MODE_MASK_X = 1 )
View Source
const ( NEW = iota BUSY REFRESH BREAK READY INVALID )
* state of sliceReader * * <-- REFRESH * | | * NEW -> BUSY -> READY * | | * BREAK ---> INVALID
View Source
const F_UNLCK = syscall.F_UNLCK
View Source
const O_ACCMODE = syscall.O_ACCMODE
Variables ¶
This section is empty.
Functions ¶
func GetInternalNodeByName ¶
func InitMetrics ¶
func InitMetrics(registerer prometheus.Registerer)
func IsSpecialName ¶
func IsSpecialNode ¶
Types ¶
type Context ¶
type Context = LogContext
type DataReader ¶
type DataReader interface { Open(inode Ino, length uint64) FileReader Truncate(inode Ino, length uint64) Invalidate(inode Ino, off, length uint64) }
func NewDataReader ¶
func NewDataReader(conf *Config, m meta.Meta, store chunk.ChunkStore) DataReader
type DataWriter ¶
type DataWriter interface { Open(inode Ino, fleng uint64) FileWriter Flush(ctx meta.Context, inode Ino) syscall.Errno GetLength(inode Ino) uint64 Truncate(inode Ino, length uint64) }
func NewDataWriter ¶
func NewDataWriter(conf *Config, m meta.Meta, store chunk.ChunkStore, reader DataReader) DataWriter
type Entry ¶
Entry is an alias of meta.Entry, which is used to generate the string representation lazily.
type FileReader ¶
type FileWriter ¶
type LogContext ¶
LogContext is an interface to add duration on meta.Context.
func NewLogContext ¶
func NewLogContext(ctx meta.Context) LogContext
NewLogContext creates an LogContext starting from now.
type VFS ¶
type VFS struct { Conf *Config Meta meta.Meta Store chunk.ChunkStore InvalidateEntry func(parent meta.Ino, name string) syscall.Errno // contains filtered or unexported fields }
func NewVFS ¶
func NewVFS(conf *Config, m meta.Meta, store chunk.ChunkStore, registerer prometheus.Registerer, registry *prometheus.Registry) *VFS
func (*VFS) CopyFileRange ¶
func (*VFS) ReleaseHandler ¶
func (*VFS) RemoveXattr ¶
Click to show internal directories.
Click to hide internal directories.