Documentation ¶
Index ¶
- Constants
- Variables
- func Dup(value []byte) []byte
- func IsADLv1Endpoint(endpoint string) bool
- func IsADLv2Endpoint(endpoint string) bool
- func LogClientInterceptor(ctx context.Context, method string, req, resp interface{}, cc *grpc.ClientConn, ...) error
- func LogServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func MaxInt(a, b int) int
- func MaxInt64(a, b int64) int64
- func MaxUInt32(a, b uint32) uint32
- func MaxUInt64(a, b uint64) uint64
- func MinInt(a, b int) int
- func MinInt64(a, b int64) int64
- func MinUInt32(a, b uint32) uint32
- func MinUInt64(a, b uint64) uint64
- func MountCluster(ctx context.Context, bucketName string, flags *cfg.FlagStorage) (*Goofys, MountedFS, error)
- func MountFuse(ctx context.Context, bucketName string, flags *cfg.FlagStorage) (fs *Goofys, mfs MountedFS, err error)
- func NilInt64(v *int64) int64
- func NilStr(v *string) string
- func NilUInt32(v *uint32) uint32
- func PBool(v bool) *bool
- func PInt32(v int32) *int32
- func PInt64(v int64) *int64
- func PMetadata(m map[string]string) map[string]*string
- func PString(v string) *string
- func PTime(v time.Time) *time.Time
- func PUInt32(v uint32) *uint32
- func PUInt64(v uint64) *uint64
- func RandStringBytesMaskImprSrc(n int) string
- func ReadBackoff(flags *cfg.FlagStorage, try func(attempt int) error) (err error)
- func SignV2(req *request.Request)
- func TryUnmount(mountPoint string) (err error)
- type ADL2Error
- type ADLv1
- func (b *ADLv1) Bucket() string
- func (b *ADLv1) Capabilities() *Capabilities
- func (b *ADLv1) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
- func (b *ADLv1) Delegate() interface{}
- func (b *ADLv1) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
- func (b *ADLv1) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
- func (b *ADLv1) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
- func (b *ADLv1) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
- func (b *ADLv1) Init(key string) error
- func (b *ADLv1) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
- func (b *ADLv1) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
- func (b *ADLv1) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
- func (b *ADLv1) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
- func (b *ADLv1) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
- func (b *ADLv1) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
- func (b *ADLv1) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error)
- func (b *ADLv1) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
- func (s *ADLv1) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error)
- func (b *ADLv1) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
- func (b *ADLv1) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
- func (b *ADLv1) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
- type ADLv1Err
- type ADLv1MultipartBlobCommitInput
- type ADLv2
- func (b *ADLv2) Bucket() string
- func (b *ADLv2) Capabilities() *Capabilities
- func (b *ADLv2) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
- func (b *ADLv2) Delegate() interface{}
- func (b *ADLv2) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
- func (b *ADLv2) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
- func (b *ADLv2) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
- func (b *ADLv2) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
- func (b *ADLv2) Init(key string) (err error)
- func (b *ADLv2) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
- func (b *ADLv2) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
- func (b *ADLv2) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
- func (b *ADLv2) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
- func (b *ADLv2) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
- func (b *ADLv2) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
- func (b *ADLv2) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error)
- func (b *ADLv2) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
- func (s *ADLv2) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error)
- func (b *ADLv2) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
- func (b *ADLv2) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
- func (b *ADLv2) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
- type ADLv2MultipartBlobCommitInput
- type AZBlob
- func (b *AZBlob) Bucket() string
- func (b *AZBlob) Capabilities() *Capabilities
- func (b *AZBlob) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
- func (b *AZBlob) Delegate() interface{}
- func (b *AZBlob) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
- func (b *AZBlob) DeleteBlobs(param *DeleteBlobsInput) (ret *DeleteBlobsOutput, deleteError error)
- func (b *AZBlob) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
- func (b *AZBlob) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
- func (b *AZBlob) Init(key string) error
- func (b *AZBlob) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
- func (b *AZBlob) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
- func (b *AZBlob) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
- func (b *AZBlob) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
- func (b *AZBlob) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
- func (b *AZBlob) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
- func (b *AZBlob) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error)
- func (b *AZBlob) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
- func (s *AZBlob) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error)
- func (b *AZBlob) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
- func (b *AZBlob) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
- func (b *AZBlob) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
- type BlobItemOutput
- type BlobPrefixOutput
- type BucketSpec
- type BufferList
- func (l *BufferList) Add(offset uint64, data []byte, state BufferState, copyData bool) (allocated int64)
- func (l *BufferList) AddLoading(offset, size uint64)
- func (l *BufferList) AddLoadingFromDisk(offset, size uint64) (readRanges []Range)
- func (l *BufferList) AnyDirty() (dirty bool)
- func (l *BufferList) AnyFlushed(offset, size uint64) (flushed bool)
- func (l *BufferList) Ascend(offset uint64, iter func(end uint64, b *FileBuffer) (cont bool, changed bool))
- func (l *BufferList) Count() int
- func (l *BufferList) DebugCheckHoles(s string)
- func (l *BufferList) Dump(offset, size uint64) string
- func (l *BufferList) EvictFromMemory(buf *FileBuffer) (allocated int64, deleted bool)
- func (l *BufferList) Get(end uint64) *FileBuffer
- func (l *BufferList) GetData(offset, size uint64, returnIds bool) (data [][]byte, ids map[uint64]bool, err error)
- func (l *BufferList) GetHoles(offset, size uint64) (holes []Range, loading bool, flushCleared bool)
- func (l *BufferList) IterateDirtyParts(cb func(partNum uint64) bool)
- func (l *BufferList) RemoveLoading(offset, size uint64)
- func (l *BufferList) RemoveRange(removeOffset, removeSize uint64, filter func(b *FileBuffer) bool) (allocated int64)
- func (l *BufferList) ReviveFromDisk(offset uint64, data []byte)
- func (l *BufferList) Select(start, end uint64, cb func(buf *FileBuffer) (good bool)) (bufs []*FileBuffer)
- func (l *BufferList) SetFlushedClean()
- func (l *BufferList) SetState(offset, size uint64, ids map[uint64]bool, state BufferState)
- func (l *BufferList) SplitAt(offset uint64)
- func (l *BufferList) ZeroRange(offset, size uint64) (zeroed bool, allocated int64)
- type BufferListHelpers
- type BufferOrZero
- type BufferPointer
- type BufferPool
- type BufferQueue
- type BufferState
- type Capabilities
- type ClusterFs
- type ClusterFsFuse
- func (fs *ClusterFsFuse) CreateFile(ctx context.Context, op *fuseops.CreateFileOp) (err error)
- func (fs *ClusterFsFuse) CreateSymlink(ctx context.Context, op *fuseops.CreateSymlinkOp) (err error)
- func (fs *ClusterFsFuse) ForgetInode(ctx context.Context, op *fuseops.ForgetInodeOp) (err error)
- func (fs *ClusterFsFuse) GetInodeAttributes(ctx context.Context, op *fuseops.GetInodeAttributesOp) (err error)
- func (fs *ClusterFsFuse) LookUpInode(ctx context.Context, op *fuseops.LookUpInodeOp) (err error)
- func (fs *ClusterFsFuse) MkDir(ctx context.Context, op *fuseops.MkDirOp) (err error)
- func (fs *ClusterFsFuse) OpenDir(ctx context.Context, op *fuseops.OpenDirOp) (err error)
- func (fs *ClusterFsFuse) OpenFile(ctx context.Context, op *fuseops.OpenFileOp) (err error)
- func (fs *ClusterFsFuse) ReadDir(ctx context.Context, op *fuseops.ReadDirOp) (err error)
- func (fs *ClusterFsFuse) ReadFile(ctx context.Context, op *fuseops.ReadFileOp) (err error)
- func (fs *ClusterFsFuse) ReadSymlink(ctx context.Context, op *fuseops.ReadSymlinkOp) (err error)
- func (fs *ClusterFsFuse) ReleaseDirHandle(ctx context.Context, op *fuseops.ReleaseDirHandleOp) (err error)
- func (fs *ClusterFsFuse) ReleaseFileHandle(ctx context.Context, op *fuseops.ReleaseFileHandleOp) (err error)
- func (fs *ClusterFsFuse) RmDir(ctx context.Context, op *fuseops.RmDirOp) (err error)
- func (fs *ClusterFsFuse) SetInodeAttributes(ctx context.Context, op *fuseops.SetInodeAttributesOp) (err error)
- func (fs *ClusterFsFuse) StatFS(ctx context.Context, op *fuseops.StatFSOp) error
- func (fs *ClusterFsFuse) Unlink(ctx context.Context, op *fuseops.UnlinkOp) (err error)
- func (fs *ClusterFsFuse) WriteFile(ctx context.Context, op *fuseops.WriteFileOp) (err error)
- type ClusterFsGrpc
- func (fs *ClusterFsGrpc) CreateFile(ctx context.Context, req *pb.CreateFileRequest) (*pb.CreateFileResponse, error)
- func (fs *ClusterFsGrpc) CreateSymlink(ctx context.Context, req *pb.CreateSymlinkRequest) (*pb.CreateSymlinkResponse, error)
- func (fs *ClusterFsGrpc) ForgetInode(ctx context.Context, req *pb.ForgetInodeRequest) (*pb.ForgetInodeResponse, error)
- func (fs *ClusterFsGrpc) ForgetInode2(ctx context.Context, req *pb.ForgetInode2Request) (*pb.ForgetInode2Response, error)
- func (fs *ClusterFsGrpc) GetInodeAttributes(ctx context.Context, req *pb.GetInodeAttributesRequest) (*pb.GetInodeAttributesResponse, error)
- func (fs *ClusterFsGrpc) LookUpInode(ctx context.Context, req *pb.LookUpInodeRequest) (*pb.LookUpInodeResponse, error)
- func (fs *ClusterFsGrpc) LookUpInode2(ctx context.Context, req *pb.LookUpInode2Request) (*pb.LookUpInode2Response, error)
- func (fs *ClusterFsGrpc) MkDir(ctx context.Context, req *pb.MkDirRequest) (*pb.MkDirResponse, error)
- func (fs *ClusterFsGrpc) OpenDir(ctx context.Context, req *pb.OpenDirRequest) (*pb.OpenDirResponse, error)
- func (fs *ClusterFsGrpc) OpenFile(ctx context.Context, req *pb.OpenFileRequest) (*pb.OpenFileResponse, error)
- func (fs *ClusterFsGrpc) ReadDir(ctx context.Context, req *pb.ReadDirRequest) (*pb.ReadDirResponse, error)
- func (fs *ClusterFsGrpc) ReadFile(ctx context.Context, req *pb.ReadFileRequest) (*pb.ReadFileResponse, error)
- func (fs *ClusterFsGrpc) ReadSymlink(ctx context.Context, req *pb.ReadSymlinkRequest) (*pb.ReadSymlinkResponse, error)
- func (fs *ClusterFsGrpc) ReleaseDirHandle(ctx context.Context, req *pb.ReleaseDirHandleRequest) (*pb.ReleaseDirHandleResponse, error)
- func (fs *ClusterFsGrpc) ReleaseFileHandle(ctx context.Context, req *pb.ReleaseFileHandleRequest) (*pb.ReleaseFileHandleResponse, error)
- func (fs *ClusterFsGrpc) RmDir(ctx context.Context, req *pb.RmDirRequest) (*pb.RmDirResponse, error)
- func (fs *ClusterFsGrpc) SetInodeAttributes(ctx context.Context, req *pb.SetInodeAttributesRequest) (*pb.SetInodeAttributesResponse, error)
- func (fs *ClusterFsGrpc) TryStealInodeOwnership(ctx context.Context, req *pb.TryStealInodeOwnershipRequest) (*pb.TryStealInodeOwnershipResponse, error)
- func (fs *ClusterFsGrpc) Unlink(ctx context.Context, req *pb.UnlinkRequest) (*pb.UnlinkResponse, error)
- func (fs *ClusterFsGrpc) WriteFile(ctx context.Context, req *pb.WriteFileRequest) (*pb.WriteFileResponse, error)
- type ConnPool
- func (conns *ConnPool) Broad(makeRequst Request) (errs map[NodeId]error)
- func (conns *ConnPool) BroadConfigurable(makeRequst Request, unmountOnError bool) (errs map[NodeId]error)
- func (conns *ConnPool) Unary(nodeId NodeId, makeRequst Request) (err error)
- func (conns *ConnPool) UnaryConfiguarble(nodeId NodeId, makeRequst Request, unmountOnError bool) (err error)
- type CopyBlobInput
- type CopyBlobOutput
- type Delegator
- type DeleteBlobInput
- type DeleteBlobOutput
- type DeleteBlobsInput
- type DeleteBlobsOutput
- type DirHandle
- type DirInodeData
- type FDQueue
- type FileBuffer
- type FileHandle
- type FuseMfsWrapper
- type GCPCredResponse
- type GCS3
- func (s *GCS3) Delegate() interface{}
- func (s *GCS3) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
- func (s *GCS3) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
- func (s *GCS3) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error)
- func (s *GCS3) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error)
- type GetBlobInput
- type GetBlobOutput
- type Goofys
- func (fs *Goofys) AddDirHandle(dh *DirHandle) fuseops.HandleID
- func (fs *Goofys) AddFileHandle(fh *FileHandle) fuseops.HandleID
- func (fs *Goofys) EvictEntry(id fuseops.InodeID) bool
- func (fs *Goofys) FDCloser()
- func (fs *Goofys) Flusher()
- func (fs *Goofys) FreeSomeCleanBuffers(origSize int64) (int64, bool)
- func (fs *Goofys) LookupParent(path string) (parent *Inode, child string, err error)
- func (fs *Goofys) LookupPath(path string) (inode *Inode, err error)
- func (fs *Goofys) MetaEvictor()
- func (fs *Goofys) Mount(mount *Mount)
- func (fs *Goofys) MountAll(mounts []*Mount)
- func (fs *Goofys) RefreshInodeCache(inode *Inode) error
- func (fs *Goofys) ScheduleRetryFlush()
- func (fs *Goofys) Shutdown()
- func (fs *Goofys) SigUsr1()
- func (fs *Goofys) StatPrinter()
- func (fs *Goofys) SyncFS(parent *Inode) (err error)
- func (fs *Goofys) Unmount(mountPoint string)
- func (fs *Goofys) WakeupFlusher()
- func (fs *Goofys) WakeupFlusherAndWait(wait bool)
- type GoofysFuse
- func (fs *GoofysFuse) CreateFile(ctx context.Context, op *fuseops.CreateFileOp) (err error)
- func (fs *GoofysFuse) CreateSymlink(ctx context.Context, op *fuseops.CreateSymlinkOp) (err error)
- func (fs *GoofysFuse) Fallocate(ctx context.Context, op *fuseops.FallocateOp) (err error)
- func (fs *GoofysFuse) FlushFile(ctx context.Context, op *fuseops.FlushFileOp) (err error)
- func (fs *GoofysFuse) ForgetInode(ctx context.Context, op *fuseops.ForgetInodeOp) (err error)
- func (fs *GoofysFuse) GetInodeAttributes(ctx context.Context, op *fuseops.GetInodeAttributesOp) (err error)
- func (fs *GoofysFuse) GetXattr(ctx context.Context, op *fuseops.GetXattrOp) (err error)
- func (fs *GoofysFuse) ListXattr(ctx context.Context, op *fuseops.ListXattrOp) (err error)
- func (fs *GoofysFuse) LookUpInode(ctx context.Context, op *fuseops.LookUpInodeOp) (err error)
- func (fs *GoofysFuse) MkDir(ctx context.Context, op *fuseops.MkDirOp) (err error)
- func (fs *GoofysFuse) MkNode(ctx context.Context, op *fuseops.MkNodeOp) (err error)
- func (fs *GoofysFuse) OpenDir(ctx context.Context, op *fuseops.OpenDirOp) (err error)
- func (fs *GoofysFuse) OpenFile(ctx context.Context, op *fuseops.OpenFileOp) (err error)
- func (fs *GoofysFuse) ReadDir(ctx context.Context, op *fuseops.ReadDirOp) (err error)
- func (fs *GoofysFuse) ReadFile(ctx context.Context, op *fuseops.ReadFileOp) (err error)
- func (fs *GoofysFuse) ReadSymlink(ctx context.Context, op *fuseops.ReadSymlinkOp) (err error)
- func (fs *GoofysFuse) ReleaseDirHandle(ctx context.Context, op *fuseops.ReleaseDirHandleOp) (err error)
- func (fs *GoofysFuse) ReleaseFileHandle(ctx context.Context, op *fuseops.ReleaseFileHandleOp) (err error)
- func (fs *GoofysFuse) RemoveXattr(ctx context.Context, op *fuseops.RemoveXattrOp) (err error)
- func (fs *GoofysFuse) Rename(ctx context.Context, op *fuseops.RenameOp) (err error)
- func (fs *GoofysFuse) RmDir(ctx context.Context, op *fuseops.RmDirOp) (err error)
- func (fs *GoofysFuse) SetConnection(conn *fuse.Connection)
- func (fs *GoofysFuse) SetInodeAttributes(ctx context.Context, op *fuseops.SetInodeAttributesOp) (err error)
- func (fs *GoofysFuse) SetXattr(ctx context.Context, op *fuseops.SetXattrOp) (err error)
- func (fs *GoofysFuse) StatFS(ctx context.Context, op *fuseops.StatFSOp) (err error)
- func (fs *GoofysFuse) SyncFile(ctx context.Context, op *fuseops.SyncFileOp) (err error)
- func (fs *GoofysFuse) Unlink(ctx context.Context, op *fuseops.UnlinkOp) (err error)
- func (fs *GoofysFuse) WriteFile(ctx context.Context, op *fuseops.WriteFileOp) (err error)
- type GrpcServer
- type HeadBlobInput
- type HeadBlobOutput
- type IMDSv1Response
- type Inode
- func (inode *Inode) ChangeOwnerLock()
- func (inode *Inode) ChangeOwnerUnlock()
- func (inode *Inode) CheckLoadRange(offset, size, readAheadSize uint64, ignoreMemoryLimit bool) (bool, error)
- func (parent *Inode) Create(name string) (*Inode, *FileHandle, error)
- func (parent *Inode) CreateOrOpen(name string, open bool) (inode *Inode, fh *FileHandle, err error)
- func (parent *Inode) CreateSymlink(name string, target string) (inode *Inode, err error)
- func (inode *Inode) DeRef(n int64) (stale bool)
- func (inode *Inode) DowngradeToKeepOwnerLock()
- func (inode *Inode) FullName() string
- func (inode *Inode) GetAttributes() *fuseops.InodeAttributes
- func (inode *Inode) GetXattr(name string) ([]byte, error)
- func (inode *Inode) InflateAttributes() (attr fuseops.InodeAttributes)
- func (inode *Inode) IsRangeLocked(offset uint64, size uint64, onlyFlushing bool) bool
- func (inode *Inode) KeepOwnerLock()
- func (inode *Inode) KeepOwnerUnlock()
- func (inode *Inode) ListXattr() ([]string, error)
- func (inode *Inode) LoadRange(offset, size uint64, readAheadSize uint64, ignoreMemoryLimit bool) (miss bool, err error)
- func (inode *Inode) LockRange(offset uint64, size uint64, flushing bool)
- func (parent *Inode) LookUp(name string, doSlurp bool) (*Inode, error)
- func (parent *Inode) LookUpCached(name string) (inode *Inode, err error)
- func (parent *Inode) LookUpInodeMaybeDir(name string) (*BlobItemOutput, error)
- func (parent *Inode) MkDir(name string) (inode *Inode, err error)
- func (inode *Inode) OpenCacheFD() error
- func (inode *Inode) OpenDir() (dh *DirHandle)
- func (inode *Inode) OpenFile() (fh *FileHandle, err error)
- func (inode *Inode) PartNum(offset uint64) uint64
- func (inode *Inode) QueueCleanBuffer(buf *FileBuffer)
- func (inode *Inode) ReadSymlink() (target string, err error)
- func (inode *Inode) Ref()
- func (inode *Inode) RemoveXattr(name string) error
- func (parent *Inode) Rename(from string, newParent *Inode, to string) (err error)
- func (inode *Inode) ResetForUnmount()
- func (inode *Inode) ResizeUnlocked(newSize uint64, finalizeFlushed bool)
- func (parent *Inode) RmDir(name string) (err error)
- func (inode *Inode) SendDelete()
- func (dir *Inode) SendMkDir()
- func (inode *Inode) SetAttrTime(tm time.Time)
- func (inode *Inode) SetAttributes(size *uint64, mode *os.FileMode, mtime *time.Time, uid *uint32, gid *uint32) (err error)
- func (inode *Inode) SetCacheState(state int32)
- func (inode *Inode) SetExpireLocked(tm time.Time)
- func (inode *Inode) SetExpireTime(tm time.Time)
- func (inode *Inode) SetFromBlobItem(item *BlobItemOutput)
- func (inode *Inode) SetXattr(name string, value []byte, flags uint32) error
- func (inode *Inode) StateLock()
- func (inode *Inode) StateUnlock()
- func (inode *Inode) SyncFile() (err error)
- func (inode *Inode) ToDir()
- func (inode *Inode) TryFlush(priority int) bool
- func (parent *Inode) Unlink(name string) (err error)
- func (inode *Inode) UnlockRange(offset uint64, size uint64, flushing bool)
- func (inode *Inode) UnqueueCleanBuffer(buf *FileBuffer)
- func (inode *Inode) UpgradeToStateLock()
- type InodeAttributes
- type InodeQueue
- type Joinable
- type ListBlobsInput
- type ListBlobsOutput
- type MPUPart
- type MakeBucketInput
- type MakeBucketOutput
- type Mount
- type MountedFS
- type MultiReader
- type MultipartBlobAbortOutput
- type MultipartBlobAddInput
- type MultipartBlobAddOutput
- type MultipartBlobBeginInput
- type MultipartBlobCommitInput
- type MultipartBlobCommitOutput
- type MultipartBlobCopyInput
- type MultipartBlobCopyOutput
- type MultipartExpireInput
- type MultipartExpireOutput
- type NodeId
- type OpStats
- type PatchBlobInput
- type PatchBlobOutput
- type Peer
- type PutBlobInput
- type PutBlobOutput
- type QueuedBuffer
- type Range
- type ReadRange
- type ReadSeekerCloser
- type Recovery
- type RemoveBucketInput
- type RemoveBucketOutput
- type RenameBlobInput
- type RenameBlobOutput
- type Request
- type S3Backend
- func (s *S3Backend) Bucket() string
- func (s *S3Backend) Capabilities() *Capabilities
- func (s *S3Backend) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
- func (s *S3Backend) Delegate() interface{}
- func (s *S3Backend) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
- func (s *S3Backend) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
- func (s *S3Backend) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
- func (s *S3Backend) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
- func (s *S3Backend) Init(key string) error
- func (s *S3Backend) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
- func (s *S3Backend) ListObjectsV2(params *s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, string, error)
- func (s *S3Backend) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
- func (s *S3Backend) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
- func (s *S3Backend) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
- func (s *S3Backend) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
- func (s *S3Backend) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
- func (s *S3Backend) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error)
- func (s *S3Backend) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
- func (s *S3Backend) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error)
- func (s *S3Backend) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
- func (s *S3Backend) RefreshIAM()
- func (s *S3Backend) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
- func (s *S3Backend) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
- func (s *S3Backend) TryIAM() (err error)
- type SlurpGap
- type Stat
- type StorageBackend
- type StorageBackendInitError
- func (s StorageBackendInitError) Bucket() string
- func (e StorageBackendInitError) Capabilities() *Capabilities
- func (e StorageBackendInitError) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
- func (e StorageBackendInitError) Delegate() interface{}
- func (e StorageBackendInitError) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
- func (e StorageBackendInitError) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
- func (e StorageBackendInitError) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
- func (e StorageBackendInitError) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
- func (e StorageBackendInitError) Init(key string) error
- func (e StorageBackendInitError) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
- func (e StorageBackendInitError) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
- func (e StorageBackendInitError) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
- func (e StorageBackendInitError) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
- func (e StorageBackendInitError) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
- func (e StorageBackendInitError) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
- func (e StorageBackendInitError) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error)
- func (e StorageBackendInitError) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
- func (e StorageBackendInitError) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error)
- func (e StorageBackendInitError) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
- func (e StorageBackendInitError) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
- func (e StorageBackendInitError) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
- type StorageBackendInitWrapper
- func (s *StorageBackendInitWrapper) Bucket() string
- func (s *StorageBackendInitWrapper) Capabilities() *Capabilities
- func (s *StorageBackendInitWrapper) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
- func (s *StorageBackendInitWrapper) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
- func (s *StorageBackendInitWrapper) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
- func (s *StorageBackendInitWrapper) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
- func (s *StorageBackendInitWrapper) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
- func (s *StorageBackendInitWrapper) Init(key string) error
- func (s *StorageBackendInitWrapper) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
- func (s *StorageBackendInitWrapper) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
- func (s *StorageBackendInitWrapper) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
- func (s *StorageBackendInitWrapper) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
- func (s *StorageBackendInitWrapper) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
- func (s *StorageBackendInitWrapper) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
- func (s *StorageBackendInitWrapper) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error)
- func (s *StorageBackendInitWrapper) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
- func (s *StorageBackendInitWrapper) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error)
- func (s *StorageBackendInitWrapper) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
- func (s *StorageBackendInitWrapper) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
- func (s *StorageBackendInitWrapper) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
Constants ¶
const ( N_INODES = fuseops.InodeID(1 << 32) N_HANDLES = fuseops.HandleID(1 << 32) STEAL_INODE_BACKOFF = 200 * time.Millisecond UNKNOWN_OWNER = 0 )
const ( SRC_NODE_ID_METADATA_KEY = "src-node-id" DST_NODE_ID_METADATA_KEY = "dst-node-id" )
const ( FALLOC_FL_KEEP_SIZE = uint32(0x01) FALLOC_FL_PUNCH_HOLE = uint32(0x02) FALLOC_FL_COLLAPSE_RANGE = uint32(0x08) FALLOC_FL_ZERO_RANGE = uint32(0x10) FALLOC_FL_INSERT_RANGE = uint32(0x20) )
const ( ST_CACHED int32 = 0 ST_DEAD int32 = 1 ST_CREATED int32 = 2 ST_MODIFIED int32 = 3 ST_DELETED int32 = 4 )
const ( XATTR_CREATE = unix.XATTR_CREATE XATTR_REPLACE = unix.XATTR_REPLACE ENOATTR = unix.ENODATA )
const ADL1_REQUEST_ID = "X-Ms-Request-Id"
const ADL2_CLIENT_REQUEST_ID = "X-Ms-Client-Request-Id"
const ADL2_REQUEST_ID = "X-Ms-Request-Id"
const AzureBlobMetaDataHeaderPrefix = "x-ms-meta-"
const AzureDirBlobMetadataKey = "hdi_isfolder"
const AzuriteEndpoint = "http://127.0.0.1:8080/devstoreaccount1/"
const CGROUP_FOLDER_PREFIX = "/sys/fs/cgroup/memory"
const CGROUP_PATH = "/proc/self/cgroup"
const INIT_ERR_BLOB = "mount.err"
const IOV_MAX = 1024
On Linux and MacOS, IOV_MAX = 1024
const MAX_BUF = 2 * 1024 * 1024
const MAX_FLUSH_PRIORITY = 3
const MEM_LIMIT_FILE_SUFFIX = "/memory.limit_in_bytes"
const MEM_USAGE_FILE_SUFFIX = "/memory.usage_in_bytes"
const OUTSTAGE_TIMEOUT = 10 * time.Second
const READY_OWNER_BACKOFF = 100 * time.Millisecond
const READ_BUF_SIZE = 128 * 1024
const STAT_PRINT_INTERVAL = 1 * time.Second
Variables ¶
var ErrBufferIsLoading = errors.New("tried to read from a loading buffer")
var ErrBufferIsMissing = errors.New("tried to read from a missing buffer")
var SmallActionsGate = make(chan int, 100)
var TIME_MAX = time.Unix(1<<63-62135596801, 999999999)
Functions ¶
func IsADLv1Endpoint ¶
func IsADLv2Endpoint ¶
func LogClientInterceptor ¶ added in v0.36.0
func LogClientInterceptor(ctx context.Context, method string, req, resp interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
func LogServerInterceptor ¶ added in v0.36.0
func LogServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
func MountCluster ¶ added in v0.36.0
func MountFuse ¶ added in v0.36.0
func MountFuse( ctx context.Context, bucketName string, flags *cfg.FlagStorage) (fs *Goofys, mfs MountedFS, err error)
Mount the file system based on the supplied arguments, returning a fuse.MountedFileSystem that can be joined to wait for unmounting.
func ReadBackoff ¶ added in v0.40.0
func ReadBackoff(flags *cfg.FlagStorage, try func(attempt int) error) (err error)
FIXME: Add similar write backoff (now it's handled by file/dir code)
func SignV2 ¶
Sign requests with signature version 2.
Will sign the requests with the service config's Credentials object Signing is skipped if the credentials is the credentials.AnonymousCredentials object.
func TryUnmount ¶
Types ¶
type ADL2Error ¶
type ADL2Error struct {
adl2.DataLakeStorageError
}
type ADLv1 ¶
type ADLv1 struct {
// contains filtered or unexported fields
}
func NewADLv1 ¶
func NewADLv1(bucket string, flags *cfg.FlagStorage, config *cfg.ADLv1Config) (*ADLv1, error)
func (*ADLv1) Capabilities ¶
func (b *ADLv1) Capabilities() *Capabilities
func (*ADLv1) CopyBlob ¶
func (b *ADLv1) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
func (*ADLv1) DeleteBlob ¶
func (b *ADLv1) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
func (*ADLv1) DeleteBlobs ¶
func (b *ADLv1) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
func (*ADLv1) GetBlob ¶
func (b *ADLv1) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
func (*ADLv1) HeadBlob ¶
func (b *ADLv1) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
func (*ADLv1) ListBlobs ¶
func (b *ADLv1) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
func (*ADLv1) MakeBucket ¶
func (b *ADLv1) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
func (*ADLv1) MultipartBlobAbort ¶
func (b *ADLv1) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
func (*ADLv1) MultipartBlobAdd ¶
func (b *ADLv1) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
func (*ADLv1) MultipartBlobBegin ¶
func (b *ADLv1) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
func (*ADLv1) MultipartBlobCommit ¶
func (b *ADLv1) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
func (*ADLv1) MultipartBlobCopy ¶
func (b *ADLv1) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error)
func (*ADLv1) MultipartExpire ¶
func (b *ADLv1) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
func (*ADLv1) PatchBlob ¶ added in v0.39.0
func (s *ADLv1) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error)
func (*ADLv1) PutBlob ¶
func (b *ADLv1) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
func (*ADLv1) RemoveBucket ¶
func (b *ADLv1) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
func (*ADLv1) RenameBlob ¶
func (b *ADLv1) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
type ADLv1Err ¶
type ADLv1MultipartBlobCommitInput ¶
type ADLv1MultipartBlobCommitInput struct {
Size uint64
}
type ADLv2 ¶
type ADLv2 struct {
// contains filtered or unexported fields
}
func NewADLv2 ¶
func NewADLv2(bucket string, flags *cfg.FlagStorage, config *cfg.ADLv2Config) (*ADLv2, error)
func (*ADLv2) Capabilities ¶
func (b *ADLv2) Capabilities() *Capabilities
func (*ADLv2) CopyBlob ¶
func (b *ADLv2) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
func (*ADLv2) DeleteBlob ¶
func (b *ADLv2) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
func (*ADLv2) DeleteBlobs ¶
func (b *ADLv2) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
func (*ADLv2) GetBlob ¶
func (b *ADLv2) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
func (*ADLv2) HeadBlob ¶
func (b *ADLv2) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
func (*ADLv2) ListBlobs ¶
func (b *ADLv2) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
func (*ADLv2) MakeBucket ¶
func (b *ADLv2) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
func (*ADLv2) MultipartBlobAbort ¶
func (b *ADLv2) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
func (*ADLv2) MultipartBlobAdd ¶
func (b *ADLv2) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
func (*ADLv2) MultipartBlobBegin ¶
func (b *ADLv2) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
adlv2 doesn't have atomic multipart upload, instead we will hold a lease, replace the object, then release the lease
func (*ADLv2) MultipartBlobCommit ¶
func (b *ADLv2) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
func (*ADLv2) MultipartBlobCopy ¶
func (b *ADLv2) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error)
func (*ADLv2) MultipartExpire ¶
func (b *ADLv2) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
func (*ADLv2) PatchBlob ¶ added in v0.39.0
func (s *ADLv2) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error)
func (*ADLv2) PutBlob ¶
func (b *ADLv2) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
func (*ADLv2) RemoveBucket ¶
func (b *ADLv2) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
func (*ADLv2) RenameBlob ¶
func (b *ADLv2) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
type AZBlob ¶
type AZBlob struct {
// contains filtered or unexported fields
}
func (*AZBlob) Capabilities ¶
func (b *AZBlob) Capabilities() *Capabilities
func (*AZBlob) CopyBlob ¶
func (b *AZBlob) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
func (*AZBlob) DeleteBlob ¶
func (b *AZBlob) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
func (*AZBlob) DeleteBlobs ¶
func (b *AZBlob) DeleteBlobs(param *DeleteBlobsInput) (ret *DeleteBlobsOutput, deleteError error)
func (*AZBlob) GetBlob ¶
func (b *AZBlob) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
func (*AZBlob) HeadBlob ¶
func (b *AZBlob) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
func (*AZBlob) ListBlobs ¶
func (b *AZBlob) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
func (*AZBlob) MakeBucket ¶
func (b *AZBlob) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
func (*AZBlob) MultipartBlobAbort ¶
func (b *AZBlob) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
func (*AZBlob) MultipartBlobAdd ¶
func (b *AZBlob) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
func (*AZBlob) MultipartBlobBegin ¶
func (b *AZBlob) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
func (*AZBlob) MultipartBlobCommit ¶
func (b *AZBlob) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
func (*AZBlob) MultipartBlobCopy ¶
func (b *AZBlob) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error)
func (*AZBlob) MultipartExpire ¶
func (b *AZBlob) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
func (*AZBlob) PatchBlob ¶ added in v0.39.0
func (s *AZBlob) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error)
func (*AZBlob) PutBlob ¶
func (b *AZBlob) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
func (*AZBlob) RemoveBucket ¶
func (b *AZBlob) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
func (*AZBlob) RenameBlob ¶
func (b *AZBlob) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
type BlobItemOutput ¶
type BlobItemOutput struct { Key *string ETag *string LastModified *time.Time Size uint64 StorageClass *string // may be nil in list responses for backends that don't return metadata in listings Metadata map[string]*string }
func (BlobItemOutput) String ¶
func (b BlobItemOutput) String() string
type BlobPrefixOutput ¶
type BlobPrefixOutput struct {
Prefix *string
}
func (BlobPrefixOutput) String ¶
func (b BlobPrefixOutput) String() string
type BucketSpec ¶
func ParseBucketSpec ¶
func ParseBucketSpec(bucket string) (spec BucketSpec, err error)
type BufferList ¶ added in v0.40.0
type BufferList struct {
// contains filtered or unexported fields
}
func (*BufferList) Add ¶ added in v0.40.0
func (l *BufferList) Add(offset uint64, data []byte, state BufferState, copyData bool) (allocated int64)
func (*BufferList) AddLoading ¶ added in v0.40.0
func (l *BufferList) AddLoading(offset, size uint64)
func (*BufferList) AddLoadingFromDisk ¶ added in v0.40.0
func (l *BufferList) AddLoadingFromDisk(offset, size uint64) (readRanges []Range)
func (*BufferList) AnyDirty ¶ added in v0.40.0
func (l *BufferList) AnyDirty() (dirty bool)
func (*BufferList) AnyFlushed ¶ added in v0.40.0
func (l *BufferList) AnyFlushed(offset, size uint64) (flushed bool)
func (*BufferList) Ascend ¶ added in v0.40.0
func (l *BufferList) Ascend(offset uint64, iter func(end uint64, b *FileBuffer) (cont bool, changed bool))
func (*BufferList) Count ¶ added in v0.40.4
func (l *BufferList) Count() int
func (*BufferList) DebugCheckHoles ¶ added in v0.40.0
func (l *BufferList) DebugCheckHoles(s string)
func (*BufferList) Dump ¶ added in v0.40.0
func (l *BufferList) Dump(offset, size uint64) string
Left here for the ease of debugging
func (*BufferList) EvictFromMemory ¶ added in v0.40.0
func (l *BufferList) EvictFromMemory(buf *FileBuffer) (allocated int64, deleted bool)
func (*BufferList) Get ¶ added in v0.40.0
func (l *BufferList) Get(end uint64) *FileBuffer
func (*BufferList) GetHoles ¶ added in v0.40.0
func (l *BufferList) GetHoles(offset, size uint64) (holes []Range, loading bool, flushCleared bool)
func (*BufferList) IterateDirtyParts ¶ added in v0.40.0
func (l *BufferList) IterateDirtyParts(cb func(partNum uint64) bool)
func (*BufferList) RemoveLoading ¶ added in v0.40.0
func (l *BufferList) RemoveLoading(offset, size uint64)
func (*BufferList) RemoveRange ¶ added in v0.40.0
func (l *BufferList) RemoveRange(removeOffset, removeSize uint64, filter func(b *FileBuffer) bool) (allocated int64)
Remove buffers in range (offset..size)
func (*BufferList) ReviveFromDisk ¶ added in v0.40.0
func (l *BufferList) ReviveFromDisk(offset uint64, data []byte)
func (*BufferList) Select ¶ added in v0.40.0
func (l *BufferList) Select(start, end uint64, cb func(buf *FileBuffer) (good bool)) (bufs []*FileBuffer)
func (*BufferList) SetFlushedClean ¶ added in v0.40.0
func (l *BufferList) SetFlushedClean()
func (*BufferList) SetState ¶ added in v0.40.0
func (l *BufferList) SetState(offset, size uint64, ids map[uint64]bool, state BufferState)
func (*BufferList) SplitAt ¶ added in v0.40.0
func (l *BufferList) SplitAt(offset uint64)
type BufferListHelpers ¶ added in v0.40.0
type BufferListHelpers interface { PartNum(uint64) uint64 QueueCleanBuffer(*FileBuffer) UnqueueCleanBuffer(*FileBuffer) }
type BufferOrZero ¶
type BufferOrZero struct {
// contains filtered or unexported fields
}
type BufferPointer ¶
type BufferPointer struct {
// contains filtered or unexported fields
}
Several FileBuffers may be slices of the same array, but we want to track memory usage, so we have to refcount them... O_o
type BufferPool ¶
type BufferPool struct { FreeSomeCleanBuffers func(size int64) (int64, bool) // contains filtered or unexported fields }
BufferPool tracks memory used by cache buffers
func NewBufferPool ¶
func NewBufferPool(limit int64, gcInterval uint64) *BufferPool
func (*BufferPool) Use ¶
func (pool *BufferPool) Use(size int64, ignoreMemoryLimit bool) (err error)
func (*BufferPool) UseUnlocked ¶
func (pool *BufferPool) UseUnlocked(size int64, ignoreMemoryLimit bool) error
type BufferQueue ¶ added in v0.40.0
type BufferQueue struct {
// contains filtered or unexported fields
}
func (*BufferQueue) Add ¶ added in v0.40.0
func (l *BufferQueue) Add(inode *Inode, b *FileBuffer)
func (*BufferQueue) Delete ¶ added in v0.40.0
func (l *BufferQueue) Delete(b *FileBuffer)
type BufferState ¶ added in v0.40.0
type BufferState int16
const ( // Buffer is clean BUF_CLEAN BufferState = 1 // Buffer is modified locally BUF_DIRTY BufferState = 2 // Buffer is flushed to the server as a full part, but multipart upload is not finalized yet BUF_FLUSHED_FULL BufferState = 3 // Buffer is flushed to the server as an undersized part // (and multipart upload is not finalized yet) BUF_FLUSHED_CUT BufferState = 4 // Buffer is flushed to the server and then removed from memory // (which is only possible for BUF_FLUSHED_FULL buffers) // (and multipart upload is not finalized yet) BUF_FL_CLEARED BufferState = 5 )
Yes I know this is against Go style. But it's easier to grep and distinguish visually so fuck off. :-)
type Capabilities ¶
type ClusterFs ¶ added in v0.36.0
type ClusterFs struct { Flags *cfg.FlagStorage Conns *ConnPool Goofys *Goofys // contains filtered or unexported fields }
func (*ClusterFs) StatPrinter ¶ added in v0.36.0
func (fs *ClusterFs) StatPrinter()
type ClusterFsFuse ¶ added in v0.36.0
type ClusterFsFuse struct { fuseutil.NotImplementedFileSystem *ClusterFs }
func (*ClusterFsFuse) CreateFile ¶ added in v0.36.0
func (fs *ClusterFsFuse) CreateFile(ctx context.Context, op *fuseops.CreateFileOp) (err error)
func (*ClusterFsFuse) CreateSymlink ¶ added in v0.36.0
func (fs *ClusterFsFuse) CreateSymlink(ctx context.Context, op *fuseops.CreateSymlinkOp) (err error)
func (*ClusterFsFuse) ForgetInode ¶ added in v0.36.0
func (fs *ClusterFsFuse) ForgetInode(ctx context.Context, op *fuseops.ForgetInodeOp) (err error)
func (*ClusterFsFuse) GetInodeAttributes ¶ added in v0.36.0
func (fs *ClusterFsFuse) GetInodeAttributes(ctx context.Context, op *fuseops.GetInodeAttributesOp) (err error)
func (*ClusterFsFuse) LookUpInode ¶ added in v0.36.0
func (fs *ClusterFsFuse) LookUpInode(ctx context.Context, op *fuseops.LookUpInodeOp) (err error)
func (*ClusterFsFuse) OpenFile ¶ added in v0.36.0
func (fs *ClusterFsFuse) OpenFile(ctx context.Context, op *fuseops.OpenFileOp) (err error)
func (*ClusterFsFuse) ReadFile ¶ added in v0.36.0
func (fs *ClusterFsFuse) ReadFile(ctx context.Context, op *fuseops.ReadFileOp) (err error)
func (*ClusterFsFuse) ReadSymlink ¶ added in v0.36.0
func (fs *ClusterFsFuse) ReadSymlink(ctx context.Context, op *fuseops.ReadSymlinkOp) (err error)
func (*ClusterFsFuse) ReleaseDirHandle ¶ added in v0.36.0
func (fs *ClusterFsFuse) ReleaseDirHandle(ctx context.Context, op *fuseops.ReleaseDirHandleOp) (err error)
func (*ClusterFsFuse) ReleaseFileHandle ¶ added in v0.36.0
func (fs *ClusterFsFuse) ReleaseFileHandle(ctx context.Context, op *fuseops.ReleaseFileHandleOp) (err error)
func (*ClusterFsFuse) SetInodeAttributes ¶ added in v0.36.0
func (fs *ClusterFsFuse) SetInodeAttributes(ctx context.Context, op *fuseops.SetInodeAttributesOp) (err error)
func (*ClusterFsFuse) WriteFile ¶ added in v0.36.0
func (fs *ClusterFsFuse) WriteFile(ctx context.Context, op *fuseops.WriteFileOp) (err error)
type ClusterFsGrpc ¶ added in v0.36.0
type ClusterFsGrpc struct { pb.UnimplementedFsGrpcServer *ClusterFs }
func (*ClusterFsGrpc) CreateFile ¶ added in v0.36.0
func (fs *ClusterFsGrpc) CreateFile(ctx context.Context, req *pb.CreateFileRequest) (*pb.CreateFileResponse, error)
func (*ClusterFsGrpc) CreateSymlink ¶ added in v0.36.0
func (fs *ClusterFsGrpc) CreateSymlink(ctx context.Context, req *pb.CreateSymlinkRequest) (*pb.CreateSymlinkResponse, error)
func (*ClusterFsGrpc) ForgetInode ¶ added in v0.36.0
func (fs *ClusterFsGrpc) ForgetInode(ctx context.Context, req *pb.ForgetInodeRequest) (*pb.ForgetInodeResponse, error)
func (*ClusterFsGrpc) ForgetInode2 ¶ added in v0.36.0
func (fs *ClusterFsGrpc) ForgetInode2(ctx context.Context, req *pb.ForgetInode2Request) (*pb.ForgetInode2Response, error)
func (*ClusterFsGrpc) GetInodeAttributes ¶ added in v0.36.0
func (fs *ClusterFsGrpc) GetInodeAttributes(ctx context.Context, req *pb.GetInodeAttributesRequest) (*pb.GetInodeAttributesResponse, error)
func (*ClusterFsGrpc) LookUpInode ¶ added in v0.36.0
func (fs *ClusterFsGrpc) LookUpInode(ctx context.Context, req *pb.LookUpInodeRequest) (*pb.LookUpInodeResponse, error)
func (*ClusterFsGrpc) LookUpInode2 ¶ added in v0.36.0
func (fs *ClusterFsGrpc) LookUpInode2(ctx context.Context, req *pb.LookUpInode2Request) (*pb.LookUpInode2Response, error)
func (*ClusterFsGrpc) MkDir ¶ added in v0.36.0
func (fs *ClusterFsGrpc) MkDir(ctx context.Context, req *pb.MkDirRequest) (*pb.MkDirResponse, error)
func (*ClusterFsGrpc) OpenDir ¶ added in v0.36.0
func (fs *ClusterFsGrpc) OpenDir(ctx context.Context, req *pb.OpenDirRequest) (*pb.OpenDirResponse, error)
func (*ClusterFsGrpc) OpenFile ¶ added in v0.36.0
func (fs *ClusterFsGrpc) OpenFile(ctx context.Context, req *pb.OpenFileRequest) (*pb.OpenFileResponse, error)
func (*ClusterFsGrpc) ReadDir ¶ added in v0.36.0
func (fs *ClusterFsGrpc) ReadDir(ctx context.Context, req *pb.ReadDirRequest) (*pb.ReadDirResponse, error)
func (*ClusterFsGrpc) ReadFile ¶ added in v0.36.0
func (fs *ClusterFsGrpc) ReadFile(ctx context.Context, req *pb.ReadFileRequest) (*pb.ReadFileResponse, error)
func (*ClusterFsGrpc) ReadSymlink ¶ added in v0.36.0
func (fs *ClusterFsGrpc) ReadSymlink(ctx context.Context, req *pb.ReadSymlinkRequest) (*pb.ReadSymlinkResponse, error)
func (*ClusterFsGrpc) ReleaseDirHandle ¶ added in v0.36.0
func (fs *ClusterFsGrpc) ReleaseDirHandle(ctx context.Context, req *pb.ReleaseDirHandleRequest) (*pb.ReleaseDirHandleResponse, error)
func (*ClusterFsGrpc) ReleaseFileHandle ¶ added in v0.36.0
func (fs *ClusterFsGrpc) ReleaseFileHandle(ctx context.Context, req *pb.ReleaseFileHandleRequest) (*pb.ReleaseFileHandleResponse, error)
func (*ClusterFsGrpc) RmDir ¶ added in v0.36.0
func (fs *ClusterFsGrpc) RmDir(ctx context.Context, req *pb.RmDirRequest) (*pb.RmDirResponse, error)
func (*ClusterFsGrpc) SetInodeAttributes ¶ added in v0.36.0
func (fs *ClusterFsGrpc) SetInodeAttributes(ctx context.Context, req *pb.SetInodeAttributesRequest) (*pb.SetInodeAttributesResponse, error)
func (*ClusterFsGrpc) TryStealInodeOwnership ¶ added in v0.36.0
func (fs *ClusterFsGrpc) TryStealInodeOwnership(ctx context.Context, req *pb.TryStealInodeOwnershipRequest) (*pb.TryStealInodeOwnershipResponse, error)
func (*ClusterFsGrpc) Unlink ¶ added in v0.36.0
func (fs *ClusterFsGrpc) Unlink(ctx context.Context, req *pb.UnlinkRequest) (*pb.UnlinkResponse, error)
func (*ClusterFsGrpc) WriteFile ¶ added in v0.36.0
func (fs *ClusterFsGrpc) WriteFile(ctx context.Context, req *pb.WriteFileRequest) (*pb.WriteFileResponse, error)
type ConnPool ¶ added in v0.36.0
type ConnPool struct {
// contains filtered or unexported fields
}
func NewConnPool ¶ added in v0.36.0
func NewConnPool(flags *cfg.FlagStorage) *ConnPool
func (*ConnPool) BroadConfigurable ¶ added in v0.36.0
type CopyBlobInput ¶
type CopyBlobOutput ¶
type CopyBlobOutput struct {
RequestId string
}
type DeleteBlobInput ¶
type DeleteBlobInput struct {
Key string
}
type DeleteBlobOutput ¶
type DeleteBlobOutput struct {
RequestId string
}
type DeleteBlobsInput ¶
type DeleteBlobsInput struct {
Items []string
}
type DeleteBlobsOutput ¶
type DeleteBlobsOutput struct {
RequestId string
}
type DirHandle ¶
type DirHandle struct {
// contains filtered or unexported fields
}
func NewDirHandle ¶
type DirInodeData ¶
type FDQueue ¶ added in v0.40.0
type FDQueue struct {
// contains filtered or unexported fields
}
func NewFDQueue ¶ added in v0.40.0
func (*FDQueue) CloseExtra ¶ added in v0.40.0
func (l *FDQueue) CloseExtra()
Close unneeded cache FDs
type FileBuffer ¶
type FileBuffer struct {
// contains filtered or unexported fields
}
func (*FileBuffer) Append ¶ added in v0.40.0
func (buf *FileBuffer) Append(data []byte) int64
type FileHandle ¶
type FileHandle struct {
// contains filtered or unexported fields
}
func NewFileHandle ¶
func NewFileHandle(inode *Inode) *FileHandle
NewFileHandle returns a new file handle for the given `inode`
func (*FileHandle) Release ¶
func (fh *FileHandle) Release()
type FuseMfsWrapper ¶ added in v0.36.0
type FuseMfsWrapper struct { *fuse.MountedFileSystem // contains filtered or unexported fields }
func (*FuseMfsWrapper) Unmount ¶ added in v0.36.0
func (m *FuseMfsWrapper) Unmount() error
type GCPCredResponse ¶ added in v0.34.2
type GCS3 ¶
type GCS3 struct { *S3Backend // contains filtered or unexported fields }
GCS variant of S3
func (*GCS3) DeleteBlobs ¶
func (s *GCS3) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
func (*GCS3) ListBlobs ¶
func (s *GCS3) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
func (*GCS3) MultipartBlobCopy ¶
func (s *GCS3) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error)
FIXME GCS doesn't have UploadPartCopy, so optimized modification flushing doesn't work You can either reupload the whole object or use some other way of making multipart objects For example, Composite Objects are even better than multipart uploads but intermediate objects should be filtered out from List responses so they don't appear as separate files then
func (*GCS3) PatchBlob ¶ added in v0.39.0
func (s *GCS3) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error)
type GetBlobInput ¶
type GetBlobOutput ¶
type GetBlobOutput struct { HeadBlobOutput Body io.ReadCloser RequestId string }
type Goofys ¶
type Goofys struct { NotifyCallback func(notifications []interface{}) // contains filtered or unexported fields }
func NewClusterGoofys ¶ added in v0.36.0
func (*Goofys) AddDirHandle ¶ added in v0.37.0
func (*Goofys) AddFileHandle ¶ added in v0.37.0
func (fs *Goofys) AddFileHandle(fh *FileHandle) fuseops.HandleID
func (*Goofys) Flusher ¶
func (fs *Goofys) Flusher()
Flusher goroutine. Overall algorithm:
- File opened => reads and writes just populate cache
- File closed => flush it Created or fully overwritten => Less than 5 MB => upload in a single part More than 5 MB => upload using multipart Updated => CURRENTLY: Less than 5 MB => upload in a single part More than 5 MB => update using multipart copy Also we can't update less than 5 MB because it's the minimal part size
- Fsync triggered => intermediate full flush (same algorithm)
- Dirty memory limit reached => without on-disk cache we have to flush the whole object. With on-disk cache we can unload some dirty buffers to disk.
func (*Goofys) FreeSomeCleanBuffers ¶
Try to reclaim some clean buffers
func (*Goofys) LookupParent ¶ added in v0.36.0
func (*Goofys) LookupPath ¶ added in v0.36.0
func (*Goofys) MetaEvictor ¶ added in v0.37.0
func (fs *Goofys) MetaEvictor()
func (*Goofys) RefreshInodeCache ¶ added in v0.36.0
func (*Goofys) ScheduleRetryFlush ¶ added in v0.28.0
func (fs *Goofys) ScheduleRetryFlush()
func (*Goofys) StatPrinter ¶ added in v0.34.2
func (fs *Goofys) StatPrinter()
func (*Goofys) WakeupFlusher ¶
func (fs *Goofys) WakeupFlusher()
func (*Goofys) WakeupFlusherAndWait ¶ added in v0.35.1
type GoofysFuse ¶ added in v0.36.0
type GoofysFuse struct { fuseutil.NotImplementedFileSystem *Goofys // contains filtered or unexported fields }
func NewGoofysFuse ¶ added in v0.36.0
func NewGoofysFuse(fs *Goofys) *GoofysFuse
func (*GoofysFuse) CreateFile ¶ added in v0.36.0
func (fs *GoofysFuse) CreateFile( ctx context.Context, op *fuseops.CreateFileOp) (err error)
func (*GoofysFuse) CreateSymlink ¶ added in v0.36.0
func (fs *GoofysFuse) CreateSymlink(ctx context.Context, op *fuseops.CreateSymlinkOp) (err error)
func (*GoofysFuse) Fallocate ¶ added in v0.36.0
func (fs *GoofysFuse) Fallocate( ctx context.Context, op *fuseops.FallocateOp) (err error)
func (*GoofysFuse) FlushFile ¶ added in v0.36.0
func (fs *GoofysFuse) FlushFile( ctx context.Context, op *fuseops.FlushFileOp) (err error)
func (*GoofysFuse) ForgetInode ¶ added in v0.36.0
func (fs *GoofysFuse) ForgetInode( ctx context.Context, op *fuseops.ForgetInodeOp) (err error)
func (*GoofysFuse) GetInodeAttributes ¶ added in v0.36.0
func (fs *GoofysFuse) GetInodeAttributes( ctx context.Context, op *fuseops.GetInodeAttributesOp) (err error)
func (*GoofysFuse) GetXattr ¶ added in v0.36.0
func (fs *GoofysFuse) GetXattr(ctx context.Context, op *fuseops.GetXattrOp) (err error)
func (*GoofysFuse) ListXattr ¶ added in v0.36.0
func (fs *GoofysFuse) ListXattr(ctx context.Context, op *fuseops.ListXattrOp) (err error)
func (*GoofysFuse) LookUpInode ¶ added in v0.36.0
func (fs *GoofysFuse) LookUpInode( ctx context.Context, op *fuseops.LookUpInodeOp) (err error)
func (*GoofysFuse) MkNode ¶ added in v0.36.0
MkNode is required for NFS even with regular files because kernel nfsd uses vfs_create() -> fuse_create() -> fuse_mknod() and then separate fuse_open() for file creation instead of fuse_create_open()
func (*GoofysFuse) OpenFile ¶ added in v0.36.0
func (fs *GoofysFuse) OpenFile( ctx context.Context, op *fuseops.OpenFileOp) (err error)
func (*GoofysFuse) ReadFile ¶ added in v0.36.0
func (fs *GoofysFuse) ReadFile( ctx context.Context, op *fuseops.ReadFileOp) (err error)
func (*GoofysFuse) ReadSymlink ¶ added in v0.36.0
func (fs *GoofysFuse) ReadSymlink(ctx context.Context, op *fuseops.ReadSymlinkOp) (err error)
func (*GoofysFuse) ReleaseDirHandle ¶ added in v0.36.0
func (fs *GoofysFuse) ReleaseDirHandle( ctx context.Context, op *fuseops.ReleaseDirHandleOp) (err error)
func (*GoofysFuse) ReleaseFileHandle ¶ added in v0.36.0
func (fs *GoofysFuse) ReleaseFileHandle( ctx context.Context, op *fuseops.ReleaseFileHandleOp) (err error)
func (*GoofysFuse) RemoveXattr ¶ added in v0.36.0
func (fs *GoofysFuse) RemoveXattr(ctx context.Context, op *fuseops.RemoveXattrOp) (err error)
func (*GoofysFuse) Rename ¶ added in v0.36.0
rename("from", "to") causes the kernel to send lookup of "from" and "to" prior to sending rename to us
func (*GoofysFuse) SetConnection ¶ added in v0.36.0
func (fs *GoofysFuse) SetConnection(conn *fuse.Connection)
func (*GoofysFuse) SetInodeAttributes ¶ added in v0.36.0
func (fs *GoofysFuse) SetInodeAttributes( ctx context.Context, op *fuseops.SetInodeAttributesOp) (err error)
func (*GoofysFuse) SetXattr ¶ added in v0.36.0
func (fs *GoofysFuse) SetXattr(ctx context.Context, op *fuseops.SetXattrOp) (err error)
func (*GoofysFuse) SyncFile ¶ added in v0.36.0
func (fs *GoofysFuse) SyncFile( ctx context.Context, op *fuseops.SyncFileOp) (err error)
func (*GoofysFuse) WriteFile ¶ added in v0.36.0
func (fs *GoofysFuse) WriteFile( ctx context.Context, op *fuseops.WriteFileOp) (err error)
type GrpcServer ¶ added in v0.36.0
func NewGrpcServer ¶ added in v0.36.0
func NewGrpcServer(flags *cfg.FlagStorage) *GrpcServer
func (*GrpcServer) Start ¶ added in v0.36.0
func (srv *GrpcServer) Start() error
type HeadBlobInput ¶
type HeadBlobInput struct {
Key string
}
type HeadBlobOutput ¶
type HeadBlobOutput struct { BlobItemOutput ContentType *string IsDirBlob bool RequestId string }
func RetryHeadBlob ¶ added in v0.40.0
func RetryHeadBlob(flags *cfg.FlagStorage, cloud StorageBackend, req *HeadBlobInput) (resp *HeadBlobOutput, err error)
type IMDSv1Response ¶ added in v0.34.2
type Inode ¶
type Inode struct { Id fuseops.InodeID Name string Attributes InodeAttributes // It is generally safe to read `AttrTime` without locking because if some other // operation is modifying `AttrTime`, in most cases the reader is okay with working with // stale data. But Time is a struct and modifying it is not atomic. However // in practice (until the year 2157) we should be okay because // - Almost all uses of AttrTime will be about comparisons (AttrTime < x, AttrTime > x) // - Time object will have Time::monotonic bit set (until the year 2157) => the time // comparision just compares Time::ext field // Ref: https://github.com/golang/go/blob/e42ae65a8507/src/time/time.go#L12:L56 AttrTime time.Time ExpireTime time.Time // We are not very consistent about enforcing locks for `Parent` because, the // parent field very very rarely changes and it is generally fine to operate on // stale parent information Parent *Inode // cached/buffered data CacheState int32 DiskFDQueueID uint64 DiskCacheFD *os.File OnDisk bool IsFlushing int // contains filtered or unexported fields }
func (*Inode) ChangeOwnerLock ¶ added in v0.36.0
func (inode *Inode) ChangeOwnerLock()
func (*Inode) ChangeOwnerUnlock ¶ added in v0.36.0
func (inode *Inode) ChangeOwnerUnlock()
func (*Inode) CheckLoadRange ¶
func (*Inode) CreateOrOpen ¶ added in v0.37.1
func (*Inode) CreateSymlink ¶
func (*Inode) DowngradeToKeepOwnerLock ¶ added in v0.36.0
func (inode *Inode) DowngradeToKeepOwnerLock()
Only for inode in StateLock
func (*Inode) GetAttributes ¶
func (inode *Inode) GetAttributes() *fuseops.InodeAttributes
LOCKS_EXCLUDED(inode.mu)
func (*Inode) InflateAttributes ¶
func (inode *Inode) InflateAttributes() (attr fuseops.InodeAttributes)
func (*Inode) IsRangeLocked ¶
func (*Inode) KeepOwnerLock ¶ added in v0.36.0
func (inode *Inode) KeepOwnerLock()
func (*Inode) KeepOwnerUnlock ¶ added in v0.36.0
func (inode *Inode) KeepOwnerUnlock()
func (*Inode) LoadRange ¶
func (inode *Inode) LoadRange(offset, size uint64, readAheadSize uint64, ignoreMemoryLimit bool) (miss bool, err error)
Load some inode data into memory Must be called with inode.mu taken Loaded range should be guarded against eviction by adding it into inode.readRanges
func (*Inode) LockRange ¶
LockRange/UnlockRange could be moved into buffer_list.go, but they still have to be stored separately from buffers and can't be a refcount - otherwise an overwrite would reset the reference count and break locking
func (*Inode) LookUpCached ¶ added in v0.36.0
func (*Inode) LookUpInodeMaybeDir ¶
func (parent *Inode) LookUpInodeMaybeDir(name string) (*BlobItemOutput, error)
func (*Inode) OpenCacheFD ¶ added in v0.26.0
func (*Inode) OpenFile ¶
func (inode *Inode) OpenFile() (fh *FileHandle, err error)
func (*Inode) QueueCleanBuffer ¶ added in v0.40.0
func (inode *Inode) QueueCleanBuffer(buf *FileBuffer)
For BufferListHelpers
func (*Inode) ReadSymlink ¶
func (*Inode) RemoveXattr ¶
func (*Inode) Rename ¶
semantic of rename: rename("any", "not_exists") = ok rename("file1", "file2") = ok rename("empty_dir1", "empty_dir2") = ok rename("nonempty_dir1", "empty_dir2") = ok rename("nonempty_dir1", "nonempty_dir2") = ENOTEMPTY rename("file", "dir") = EISDIR rename("dir", "file") = ENOTDIR LOCKS_EXCLUDED(parent.mu) LOCKS_EXCLUDED(newParent.mu)
func (*Inode) ResetForUnmount ¶
func (inode *Inode) ResetForUnmount()
ResetForUnmount resets the Inode as part of unmounting a storage backend mounted at the given inode. ACQUIRES_LOCK(inode.mu)
func (*Inode) ResizeUnlocked ¶
func (*Inode) SendDelete ¶
func (inode *Inode) SendDelete()
func (*Inode) SetAttrTime ¶ added in v0.37.0
LOCKS_REQUIRED(inode.mu) LOCKS_EXCLUDED(inode.fs.mu)
func (*Inode) SetAttributes ¶ added in v0.36.0
func (*Inode) SetCacheState ¶
LOCKS_REQUIRED(inode.mu)
func (*Inode) SetExpireLocked ¶ added in v0.37.3
LOCKS_EXCLUDED(inode.mu) LOCKS_EXCLUDED(inode.fs.mu)
func (*Inode) SetExpireTime ¶ added in v0.37.3
LOCKS_REQUIRED(inode.mu) LOCKS_EXCLUDED(inode.fs.mu)
func (*Inode) SetFromBlobItem ¶
func (inode *Inode) SetFromBlobItem(item *BlobItemOutput)
LOCKS_EXCLUDED(inode.mu)
func (*Inode) StateUnlock ¶ added in v0.36.0
func (inode *Inode) StateUnlock()
func (*Inode) UnlockRange ¶
func (*Inode) UnqueueCleanBuffer ¶ added in v0.40.0
func (inode *Inode) UnqueueCleanBuffer(buf *FileBuffer)
For BufferListHelpers
func (*Inode) UpgradeToStateLock ¶ added in v0.36.0
func (inode *Inode) UpgradeToStateLock()
Only for inode in KeepOwnerLock
type InodeAttributes ¶
type InodeQueue ¶ added in v0.40.0
type InodeQueue struct {
// contains filtered or unexported fields
}
func (*InodeQueue) Add ¶ added in v0.40.0
func (l *InodeQueue) Add(inodeID uint64) (queueID uint64)
func (*InodeQueue) Delete ¶ added in v0.40.0
func (l *InodeQueue) Delete(queueID uint64)
func (*InodeQueue) Next ¶ added in v0.40.0
func (l *InodeQueue) Next(minQueueID uint64) (inodeID, nextQueueID uint64)
func (*InodeQueue) Size ¶ added in v0.40.0
func (l *InodeQueue) Size() int
type ListBlobsInput ¶
type ListBlobsOutput ¶
type ListBlobsOutput struct { Prefixes []BlobPrefixOutput Items []BlobItemOutput NextContinuationToken *string IsTruncated bool RequestId string }
func RetryListBlobs ¶ added in v0.40.0
func RetryListBlobs(flags *cfg.FlagStorage, cloud StorageBackend, req *ListBlobsInput) (resp *ListBlobsOutput, err error)
type MakeBucketInput ¶
type MakeBucketInput struct { }
type MakeBucketOutput ¶
type MakeBucketOutput struct {
RequestId string
}
type MultiReader ¶
type MultiReader struct {
// contains filtered or unexported fields
}
func NewMultiReader ¶
func NewMultiReader() *MultiReader
func (*MultiReader) AddBuffer ¶
func (r *MultiReader) AddBuffer(buf []byte)
func (*MultiReader) AddZero ¶
func (r *MultiReader) AddZero(size uint64)
func (*MultiReader) Len ¶
func (r *MultiReader) Len() uint64
type MultipartBlobAbortOutput ¶
type MultipartBlobAbortOutput struct {
RequestId string
}
type MultipartBlobAddInput ¶
type MultipartBlobAddInput struct { Commit *MultipartBlobCommitInput PartNumber uint32 Body io.ReadSeeker Size uint64 // GCS wants to know part size Offset uint64 // ADLv2 needs to know offset }
type MultipartBlobAddOutput ¶
type MultipartBlobBeginInput ¶
type MultipartBlobCopyInput ¶
type MultipartBlobCopyInput struct { Commit *MultipartBlobCommitInput PartNumber uint32 CopySource string Offset uint64 Size uint64 }
type MultipartBlobCopyOutput ¶
type MultipartExpireInput ¶
type MultipartExpireInput struct { }
type MultipartExpireOutput ¶
type MultipartExpireOutput struct {
RequestId string
}
type PatchBlobInput ¶ added in v0.39.0
type PatchBlobOutput ¶ added in v0.39.0
type PutBlobInput ¶
type PutBlobOutput ¶
type QueuedBuffer ¶ added in v0.40.0
type QueuedBuffer struct {
// contains filtered or unexported fields
}
type ReadSeekerCloser ¶
type ReadSeekerCloser struct {
io.ReadSeeker
}
func (*ReadSeekerCloser) Close ¶
func (r *ReadSeekerCloser) Close() error
type Recovery ¶ added in v0.36.0
type Recovery struct { pb.UnimplementedRecoveryServer Flags *cfg.FlagStorage }
func (*Recovery) Unmount ¶ added in v0.36.0
func (rec *Recovery) Unmount(ctx context.Context, req *pb.UnmountRequest) (*pb.UnmountResponse, error)
type RemoveBucketInput ¶
type RemoveBucketInput struct { }
type RemoveBucketOutput ¶
type RemoveBucketOutput struct {
RequestId string
}
type RenameBlobInput ¶
type RenameBlobOutput ¶
type RenameBlobOutput struct {
RequestId string
}
type S3Backend ¶
func (*S3Backend) Capabilities ¶
func (s *S3Backend) Capabilities() *Capabilities
func (*S3Backend) CopyBlob ¶
func (s *S3Backend) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
func (*S3Backend) DeleteBlob ¶
func (s *S3Backend) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
func (*S3Backend) DeleteBlobs ¶
func (s *S3Backend) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
func (*S3Backend) GetBlob ¶
func (s *S3Backend) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
func (*S3Backend) HeadBlob ¶
func (s *S3Backend) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
func (*S3Backend) ListBlobs ¶
func (s *S3Backend) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
func (*S3Backend) ListObjectsV2 ¶
func (s *S3Backend) ListObjectsV2(params *s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, string, error)
func (*S3Backend) MakeBucket ¶
func (s *S3Backend) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
func (*S3Backend) MultipartBlobAbort ¶
func (s *S3Backend) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
func (*S3Backend) MultipartBlobAdd ¶
func (s *S3Backend) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
func (*S3Backend) MultipartBlobBegin ¶
func (s *S3Backend) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
func (*S3Backend) MultipartBlobCommit ¶
func (s *S3Backend) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
func (*S3Backend) MultipartBlobCopy ¶
func (s *S3Backend) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error)
func (*S3Backend) MultipartExpire ¶
func (s *S3Backend) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
func (*S3Backend) PatchBlob ¶ added in v0.39.0
func (s *S3Backend) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error)
func (*S3Backend) PutBlob ¶
func (s *S3Backend) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
func (*S3Backend) RefreshIAM ¶
func (s *S3Backend) RefreshIAM()
func (*S3Backend) RemoveBucket ¶
func (s *S3Backend) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
func (*S3Backend) RenameBlob ¶
func (s *S3Backend) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
type StorageBackend ¶
type StorageBackend interface { Init(key string) error Capabilities() *Capabilities // typically this would return bucket/prefix Bucket() string HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error) GetBlob(param *GetBlobInput) (*GetBlobOutput, error) PutBlob(param *PutBlobInput) (*PutBlobOutput, error) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error) Delegate() interface{} }
/ Implementations of all the functions here are expected to be / concurrency-safe, except for / / Init() is called exactly once before any other functions are / called. / / Capabilities()/Bucket() are expected to be const
func NewBackend ¶
func NewBackend(bucket string, flags *cfg.FlagStorage) (cloud StorageBackend, err error)
type StorageBackendInitError ¶
type StorageBackendInitError struct {
// contains filtered or unexported fields
}
func (StorageBackendInitError) Bucket ¶
func (s StorageBackendInitError) Bucket() string
func (StorageBackendInitError) Capabilities ¶
func (e StorageBackendInitError) Capabilities() *Capabilities
func (StorageBackendInitError) CopyBlob ¶
func (e StorageBackendInitError) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
func (StorageBackendInitError) Delegate ¶
func (e StorageBackendInitError) Delegate() interface{}
func (StorageBackendInitError) DeleteBlob ¶
func (e StorageBackendInitError) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
func (StorageBackendInitError) DeleteBlobs ¶
func (e StorageBackendInitError) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
func (StorageBackendInitError) GetBlob ¶
func (e StorageBackendInitError) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
func (StorageBackendInitError) HeadBlob ¶
func (e StorageBackendInitError) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
func (StorageBackendInitError) Init ¶
func (e StorageBackendInitError) Init(key string) error
func (StorageBackendInitError) ListBlobs ¶
func (e StorageBackendInitError) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
func (StorageBackendInitError) MakeBucket ¶
func (e StorageBackendInitError) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
func (StorageBackendInitError) MultipartBlobAbort ¶
func (e StorageBackendInitError) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
func (StorageBackendInitError) MultipartBlobAdd ¶
func (e StorageBackendInitError) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
func (StorageBackendInitError) MultipartBlobBegin ¶
func (e StorageBackendInitError) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
func (StorageBackendInitError) MultipartBlobCommit ¶
func (e StorageBackendInitError) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
func (StorageBackendInitError) MultipartBlobCopy ¶
func (e StorageBackendInitError) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error)
func (StorageBackendInitError) MultipartExpire ¶
func (e StorageBackendInitError) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
func (StorageBackendInitError) PatchBlob ¶ added in v0.39.0
func (e StorageBackendInitError) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error)
func (StorageBackendInitError) PutBlob ¶
func (e StorageBackendInitError) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
func (StorageBackendInitError) RemoveBucket ¶
func (e StorageBackendInitError) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
func (StorageBackendInitError) RenameBlob ¶
func (e StorageBackendInitError) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
type StorageBackendInitWrapper ¶
type StorageBackendInitWrapper struct { StorageBackend // contains filtered or unexported fields }
func (*StorageBackendInitWrapper) Bucket ¶
func (s *StorageBackendInitWrapper) Bucket() string
func (*StorageBackendInitWrapper) Capabilities ¶
func (s *StorageBackendInitWrapper) Capabilities() *Capabilities
func (*StorageBackendInitWrapper) CopyBlob ¶
func (s *StorageBackendInitWrapper) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
func (*StorageBackendInitWrapper) DeleteBlob ¶
func (s *StorageBackendInitWrapper) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
func (*StorageBackendInitWrapper) DeleteBlobs ¶
func (s *StorageBackendInitWrapper) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
func (*StorageBackendInitWrapper) GetBlob ¶
func (s *StorageBackendInitWrapper) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
func (*StorageBackendInitWrapper) HeadBlob ¶
func (s *StorageBackendInitWrapper) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
func (*StorageBackendInitWrapper) Init ¶
func (s *StorageBackendInitWrapper) Init(key string) error
func (*StorageBackendInitWrapper) ListBlobs ¶
func (s *StorageBackendInitWrapper) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
func (*StorageBackendInitWrapper) MakeBucket ¶
func (s *StorageBackendInitWrapper) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
func (*StorageBackendInitWrapper) MultipartBlobAbort ¶
func (s *StorageBackendInitWrapper) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
func (*StorageBackendInitWrapper) MultipartBlobAdd ¶
func (s *StorageBackendInitWrapper) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
func (*StorageBackendInitWrapper) MultipartBlobBegin ¶
func (s *StorageBackendInitWrapper) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
func (*StorageBackendInitWrapper) MultipartBlobCommit ¶
func (s *StorageBackendInitWrapper) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
func (*StorageBackendInitWrapper) MultipartBlobCopy ¶
func (s *StorageBackendInitWrapper) MultipartBlobCopy(param *MultipartBlobCopyInput) (*MultipartBlobCopyOutput, error)
func (*StorageBackendInitWrapper) MultipartExpire ¶
func (s *StorageBackendInitWrapper) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
func (*StorageBackendInitWrapper) PatchBlob ¶ added in v0.39.0
func (s *StorageBackendInitWrapper) PatchBlob(param *PatchBlobInput) (*PatchBlobOutput, error)
func (*StorageBackendInitWrapper) PutBlob ¶
func (s *StorageBackendInitWrapper) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
func (*StorageBackendInitWrapper) RemoveBucket ¶
func (s *StorageBackendInitWrapper) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
func (*StorageBackendInitWrapper) RenameBlob ¶
func (s *StorageBackendInitWrapper) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
Source Files ¶
- backend.go
- backend_adlv1.go
- backend_adlv2.go
- backend_azblob.go
- backend_gcs3.go
- backend_s3.go
- buffer_list.go
- buffer_pool.go
- buffer_queue.go
- buffer_reader.go
- cgroup.go
- cluster_conn_pool.go
- cluster_fs.go
- cluster_fs_fuse.go
- cluster_fs_grpc.go
- cluster_grpc_server.go
- cluster_inode.go
- cluster_recovery.go
- dir.go
- fd_queue.go
- file.go
- goofys.go
- goofys_fuse.go
- handles.go
- utils.go
- utils_linux.go
- v2signer.go