bridgefs

package
Version: v0.0.0-...-af1044f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBridgeFileHandle

func NewBridgeFileHandle(fd int) fs.FileHandle

NewBridgeFileHandle creates a FileHandle out of a file descriptor. All operations are implemented. When using the Fd from a *os.File, call syscall.Dup() on the Fd, to avoid os.File's finalizer from closing the file descriptor.

func NewBridgeNode

func NewBridgeNode(n *BridgeNode) fs.InodeEmbedder

func NewBridgeRoot

func NewBridgeRoot(rootPath string, NewNode func(rootData *bridgeRoot) fs.InodeEmbedder, GetRealPath func(nodePath string) string) (fs.InodeEmbedder, error)

NewBridgeRoot returns a root node for a loopback file system whose root is at the given root. This node implements all NodeXxxxer operations available.

Types

type BridgeFileHandle

type BridgeFileHandle struct {
	Mu sync.Mutex
	Fd int
}

func (*BridgeFileHandle) Allocate

func (f *BridgeFileHandle) Allocate(ctx context.Context, off uint64, sz uint64, mode uint32) syscall.Errno

func (*BridgeFileHandle) Flush

func (*BridgeFileHandle) Fsync

func (f *BridgeFileHandle) Fsync(ctx context.Context, flags uint32) (errno syscall.Errno)

func (*BridgeFileHandle) Getattr

func (*BridgeFileHandle) Getlk

func (f *BridgeFileHandle) Getlk(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32, out *fuse.FileLock) (errno syscall.Errno)

func (*BridgeFileHandle) Lseek

func (f *BridgeFileHandle) Lseek(ctx context.Context, off uint64, whence uint32) (uint64, syscall.Errno)

func (*BridgeFileHandle) Read

func (f *BridgeFileHandle) Read(ctx context.Context, buf []byte, off int64) (res fuse.ReadResult, errno syscall.Errno)

func (*BridgeFileHandle) Release

func (f *BridgeFileHandle) Release(ctx context.Context) syscall.Errno

func (*BridgeFileHandle) Setattr

func (f *BridgeFileHandle) Setattr(ctx context.Context, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno

func (*BridgeFileHandle) Setlk

func (f *BridgeFileHandle) Setlk(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32) (errno syscall.Errno)

func (*BridgeFileHandle) Setlkw

func (f *BridgeFileHandle) Setlkw(ctx context.Context, owner uint64, lk *fuse.FileLock, flags uint32) (errno syscall.Errno)

func (*BridgeFileHandle) Write

func (f *BridgeFileHandle) Write(ctx context.Context, data []byte, off int64) (uint32, syscall.Errno)

type BridgeNode

type BridgeNode struct {
	fs.Inode

	RootData *bridgeRoot
}

LoopbackNode is a filesystem node in a loopback file system.

func (*BridgeNode) CopyFileRange

func (n *BridgeNode) CopyFileRange(ctx context.Context, fhIn fs.FileHandle,
	offIn uint64, out *fs.Inode, fhOut fs.FileHandle, offOut uint64,
	len uint64, flags uint64) (uint32, syscall.Errno)

func (*BridgeNode) Create

func (n *BridgeNode) Create(ctx context.Context, name string, flags uint32, mode uint32, out *fuse.EntryOut) (inode *fs.Inode, fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)

func (*BridgeNode) GetRealPath

func (n *BridgeNode) GetRealPath(name string) string

func (*BridgeNode) Getattr

func (n *BridgeNode) Getattr(ctx context.Context, f fs.FileHandle, out *fuse.AttrOut) syscall.Errno

func (*BridgeNode) Getxattr

func (n *BridgeNode) Getxattr(ctx context.Context, attr string, dest []byte) (uint32, syscall.Errno)
func (n *BridgeNode) Link(ctx context.Context, target fs.InodeEmbedder, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)

func (*BridgeNode) Listxattr

func (n *BridgeNode) Listxattr(ctx context.Context, dest []byte) (uint32, syscall.Errno)

func (*BridgeNode) Lookup

func (n *BridgeNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)

func (*BridgeNode) Mkdir

func (n *BridgeNode) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)

func (*BridgeNode) Mknod

func (n *BridgeNode) Mknod(ctx context.Context, name string, mode, rdev uint32, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)

func (*BridgeNode) Open

func (n *BridgeNode) Open(ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)

func (*BridgeNode) Opendir

func (n *BridgeNode) Opendir(ctx context.Context) syscall.Errno

func (*BridgeNode) Readdir

func (n *BridgeNode) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno)
func (n *BridgeNode) Readlink(ctx context.Context) ([]byte, syscall.Errno)

func (*BridgeNode) Removexattr

func (n *BridgeNode) Removexattr(ctx context.Context, attr string) syscall.Errno

func (*BridgeNode) Rename

func (n *BridgeNode) Rename(ctx context.Context, name string, newParent fs.InodeEmbedder, newName string, flags uint32) syscall.Errno

func (*BridgeNode) Rmdir

func (n *BridgeNode) Rmdir(ctx context.Context, name string) syscall.Errno

func (*BridgeNode) Setxattr

func (n *BridgeNode) Setxattr(ctx context.Context, attr string, data []byte, flags uint32) syscall.Errno

func (*BridgeNode) Statfs

func (n *BridgeNode) Statfs(ctx context.Context, out *fuse.StatfsOut) syscall.Errno
func (n *BridgeNode) Symlink(ctx context.Context, target, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
func (n *BridgeNode) Unlink(ctx context.Context, name string) syscall.Errno

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL