Documentation ¶
Overview ¶
Package fs implements an AIStore file system.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package fs implements an AIStore file system.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package fs implements an AIStore file system.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package fs implements an AIStore file system.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package fs implements an AIStore file system.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package fs implements an AIStore file system.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package fs implements an AIStore file system.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package fs implements an AIStore file system.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package fs implements an AIStore file system.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package fs implements an AIStore file system.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package fs implements an AIStore file system.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package fs implements an AIStore file system.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Index ¶
- Constants
- func NewAISFileSystemServer(cfg *ServerConfig, errLog *log.Logger) (srv fuse.Server, err error)
- type AttrUpdateReq
- type DirectoryInode
- func (in *DirectoryInode) AsChildEntry() (en fuseops.ChildInodeEntry)
- func (in *DirectoryInode) Attributes() (attrs fuseops.InodeAttributes)
- func (in *DirectoryInode) DecLookupCountN(n uint64) uint64
- func (*DirectoryInode) Destroy() error
- func (dir *DirectoryInode) ForgetDir(entryName string)
- func (dir *DirectoryInode) ForgetFile(entryName string)
- func (in *DirectoryInode) ID() fuseops.InodeID
- func (in *DirectoryInode) IncLookupCount()
- func (dir *DirectoryInode) InvalidateInode(entryName string, isDir bool)
- func (*DirectoryInode) IsDir() bool
- func (dir *DirectoryInode) LinkNewFile(fileName string) (*ais.Object, error)
- func (dir *DirectoryInode) LookupEntry(entryName string) (res EntryLookupResult)
- func (dir *DirectoryInode) NewDirEntry(entryName string, id fuseops.InodeID)
- func (dir *DirectoryInode) NewFileEntry(entryName string, id fuseops.InodeID, object *ais.Object)
- func (dir *DirectoryInode) Parent() Inode
- func (in *DirectoryInode) Path() string
- func (dir *DirectoryInode) ReadEntries() (entries []fuseutil.Dirent, err error)
- func (in *DirectoryInode) SetAttributes(attrs fuseops.InodeAttributes)
- func (dir *DirectoryInode) UnlinkEntry(entryName string) error
- func (dir *DirectoryInode) UpdateAttributes(req *AttrUpdateReq) fuseops.InodeAttributes
- type EntryLookupResult
- type FileInode
- func (in *FileInode) AsChildEntry() (en fuseops.ChildInodeEntry)
- func (in *FileInode) Attributes() (attrs fuseops.InodeAttributes)
- func (in *FileInode) DecLookupCountN(n uint64) uint64
- func (*FileInode) Destroy() error
- func (file *FileInode) Flush(handle string, cksum *cos.Cksum) error
- func (in *FileInode) ID() fuseops.InodeID
- func (in *FileInode) IncLookupCount()
- func (*FileInode) IsDir() bool
- func (file *FileInode) Load(w io.Writer, offset, length int64) (n int64, err error)
- func (file *FileInode) Parent() Inode
- func (in *FileInode) Path() string
- func (in *FileInode) SetAttributes(attrs fuseops.InodeAttributes)
- func (file *FileInode) SetSize(size uint64)
- func (file *FileInode) Size() uint64
- func (file *FileInode) UpdateAttributes(req *AttrUpdateReq) fuseops.InodeAttributes
- func (file *FileInode) UpdateBackingObject(obj *ais.Object)
- func (file *FileInode) Write(r cos.ReadOpenCloser, handle string, size int64) (string, error)
- type Inode
- type ModeBits
- type Owner
- type ServerConfig
Constants ¶
const ( FilePermissionBits os.FileMode = cos.PermRWR DirectoryPermissionBits os.FileMode = cos.PermRWXRX )
const (
Name = "aisfs"
)
Variables ¶
This section is empty.
Functions ¶
func NewAISFileSystemServer ¶
Types ¶
type AttrUpdateReq ¶
AttrUpdateReq is a request struct for updating inode attributes corresponding to non-nil struct fields.
type DirectoryInode ¶
type DirectoryInode struct {
// contains filtered or unexported fields
}
func (*DirectoryInode) AsChildEntry ¶
func (in *DirectoryInode) AsChildEntry() (en fuseops.ChildInodeEntry)
AsChildEntry returns a fuseops.ChildInodeEntry struct constructed from the current inode state. REQUIRES_READ_LOCK(in)
func (*DirectoryInode) Attributes ¶
func (in *DirectoryInode) Attributes() (attrs fuseops.InodeAttributes)
Attributes returns inode's attributes (mode, size, atime...). REQUIRES_READ_LOCK(in)
func (*DirectoryInode) DecLookupCountN ¶
DecLookupCountN atomically decrements inode's lookup count by n.
func (*DirectoryInode) Destroy ¶
func (*DirectoryInode) Destroy() error
Destroy releases all resources allocated by the inode.
func (*DirectoryInode) ForgetDir ¶
func (dir *DirectoryInode) ForgetDir(entryName string)
REQUIRES_LOCK(dir)
func (*DirectoryInode) ForgetFile ¶
func (dir *DirectoryInode) ForgetFile(entryName string)
REQUIRES_LOCK(dir)
func (*DirectoryInode) IncLookupCount ¶
func (in *DirectoryInode) IncLookupCount()
IncLookupCount atomically increments inode's lookup count.
func (*DirectoryInode) InvalidateInode ¶
func (dir *DirectoryInode) InvalidateInode(entryName string, isDir bool)
func (*DirectoryInode) IsDir ¶
func (*DirectoryInode) IsDir() bool
func (*DirectoryInode) LinkNewFile ¶
func (dir *DirectoryInode) LinkNewFile(fileName string) (*ais.Object, error)
func (*DirectoryInode) LookupEntry ¶
func (dir *DirectoryInode) LookupEntry(entryName string) (res EntryLookupResult)
func (*DirectoryInode) NewDirEntry ¶
func (dir *DirectoryInode) NewDirEntry(entryName string, id fuseops.InodeID)
REQUIRES_LOCK(dir)
func (*DirectoryInode) NewFileEntry ¶
REQUIRES_LOCK(dir)
func (*DirectoryInode) Parent ¶
func (dir *DirectoryInode) Parent() Inode
func (*DirectoryInode) Path ¶
func (in *DirectoryInode) Path() string
Path returns a path that maps to an inode. The file system does not support hard links, so there is only one path for each inode. NOTE: Path does not start with a separator.
func (*DirectoryInode) ReadEntries ¶
func (dir *DirectoryInode) ReadEntries() (entries []fuseutil.Dirent, err error)
REQUIRES_LOCK(dir)
func (*DirectoryInode) SetAttributes ¶
func (in *DirectoryInode) SetAttributes(attrs fuseops.InodeAttributes)
SetAttributes sets inode attributes. REQUIRES_LOCK(in)
func (*DirectoryInode) UnlinkEntry ¶
func (dir *DirectoryInode) UnlinkEntry(entryName string) error
LOCKS(dir)
func (*DirectoryInode) UpdateAttributes ¶
func (dir *DirectoryInode) UpdateAttributes(req *AttrUpdateReq) fuseops.InodeAttributes
REQUIRES_LOCK(dir)
type EntryLookupResult ¶
EntryLookupResult is a struct returned as a result of directory entry lookup.
func (EntryLookupResult) IsDir ¶
func (res EntryLookupResult) IsDir() bool
IsDir checks if an entry maps to a directory.
func (EntryLookupResult) NoEntry ¶
func (res EntryLookupResult) NoEntry() bool
NoEntry checks if lookup operation found an entry.
func (EntryLookupResult) NoInode ¶
func (res EntryLookupResult) NoInode() bool
NoInode checks if inode number is known for an entry.
type FileInode ¶
type FileInode struct {
// contains filtered or unexported fields
}
func (*FileInode) AsChildEntry ¶
func (in *FileInode) AsChildEntry() (en fuseops.ChildInodeEntry)
AsChildEntry returns a fuseops.ChildInodeEntry struct constructed from the current inode state. REQUIRES_READ_LOCK(in)
func (*FileInode) Attributes ¶
func (in *FileInode) Attributes() (attrs fuseops.InodeAttributes)
Attributes returns inode's attributes (mode, size, atime...). REQUIRES_READ_LOCK(in)
func (*FileInode) DecLookupCountN ¶
DecLookupCountN atomically decrements inode's lookup count by n.
func (*FileInode) Destroy ¶
func (*FileInode) Destroy() error
Destroy releases all resources allocated by the inode.
func (*FileInode) IncLookupCount ¶
func (in *FileInode) IncLookupCount()
IncLookupCount atomically increments inode's lookup count.
func (*FileInode) Path ¶
func (in *FileInode) Path() string
Path returns a path that maps to an inode. The file system does not support hard links, so there is only one path for each inode. NOTE: Path does not start with a separator.
func (*FileInode) SetAttributes ¶
func (in *FileInode) SetAttributes(attrs fuseops.InodeAttributes)
SetAttributes sets inode attributes. REQUIRES_LOCK(in)
func (*FileInode) UpdateAttributes ¶
func (file *FileInode) UpdateAttributes(req *AttrUpdateReq) fuseops.InodeAttributes
REQUIRES_LOCK(file)
func (*FileInode) UpdateBackingObject ¶
REQUIRES_LOCK(file)
type Inode ¶
type Inode interface { // Locking sync.Locker RLock() RUnlock() // General Parent() Inode ID() fuseops.InodeID Path() string IsDir() bool Destroy() error // Attributes Attributes() fuseops.InodeAttributes UpdateAttributes(*AttrUpdateReq) fuseops.InodeAttributes AsChildEntry() fuseops.ChildInodeEntry // Lookup count IncLookupCount() DecLookupCountN(n uint64) uint64 }
func NewDirectoryInode ¶
func NewDirectoryInode(id fuseops.InodeID, attrs fuseops.InodeAttributes, path string, parent *DirectoryInode, bucket ais.Bucket) Inode
func NewFileInode ¶
func NewFileInode(id fuseops.InodeID, attrs fuseops.InodeAttributes, parent *DirectoryInode, object *ais.Object) Inode