fuse

package
v0.0.0-...-957f62e Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0, MIT Imports: 28 Imported by: 0

Documentation

Overview

Package fuse implements fusefs.

Index

Constants

View Source
const Name = "fuse"

Name is the default filesystem name.

Variables

View Source
var (
	MaxUserBackgroundRequest   uint16 = fuseDefaultMaxBackground
	MaxUserCongestionThreshold uint16 = fuseDefaultCongestionThreshold
)

Adjustable maximums for Connection's cogestion control parameters. Used as the upperbound of the config values. Currently we do not support adjustment to them.

Functions

func CreateDevtmpfsFile

func CreateDevtmpfsFile(ctx context.Context, dev *devtmpfs.Accessor) error

CreateDevtmpfsFile creates a device special file in devtmpfs.

func Register

func Register(vfsObj *vfs.VirtualFilesystem) error

Register registers the FUSE device with vfsObj.

Types

type DeviceFD

type DeviceFD struct {
	vfs.FileDescriptionDefaultImpl
	vfs.DentryMetadataFileDescriptionImpl
	vfs.NoLockFD
	// contains filtered or unexported fields
}

DeviceFD implements vfs.FileDescriptionImpl for /dev/fuse.

+stateify savable

func (*DeviceFD) Epollable

func (fd *DeviceFD) Epollable() bool

Epollable implements FileDescriptionImpl.Epollable.

func (*DeviceFD) EventRegister

func (fd *DeviceFD) EventRegister(e *waiter.Entry) error

EventRegister implements waiter.Waitable.EventRegister.

func (*DeviceFD) EventUnregister

func (fd *DeviceFD) EventUnregister(e *waiter.Entry)

EventUnregister implements waiter.Waitable.EventUnregister.

func (*DeviceFD) PRead

func (fd *DeviceFD) PRead(ctx context.Context, dst usermem.IOSequence, offset int64, opts vfs.ReadOptions) (int64, error)

PRead implements vfs.FileDescriptionImpl.PRead.

func (*DeviceFD) PWrite

func (fd *DeviceFD) PWrite(ctx context.Context, src usermem.IOSequence, offset int64, opts vfs.WriteOptions) (int64, error)

PWrite implements vfs.FileDescriptionImpl.PWrite.

func (*DeviceFD) Read

func (fd *DeviceFD) Read(ctx context.Context, dst usermem.IOSequence, opts vfs.ReadOptions) (int64, error)

Read implements vfs.FileDescriptionImpl.Read.

func (*DeviceFD) Readiness

func (fd *DeviceFD) Readiness(mask waiter.EventMask) waiter.EventMask

Readiness implements vfs.FileDescriptionImpl.Readiness.

func (*DeviceFD) Release

func (fd *DeviceFD) Release(ctx context.Context)

Release implements vfs.FileDescriptionImpl.Release.

func (*DeviceFD) Seek

func (fd *DeviceFD) Seek(ctx context.Context, offset int64, whence int32) (int64, error)

Seek implements vfs.FileDescriptionImpl.Seek.

func (*DeviceFD) StateFields

func (fd *DeviceFD) StateFields() []string

func (*DeviceFD) StateLoad

func (fd *DeviceFD) StateLoad(stateSourceObject state.Source)

+checklocksignore

func (*DeviceFD) StateSave

func (fd *DeviceFD) StateSave(stateSinkObject state.Sink)

+checklocksignore

func (*DeviceFD) StateTypeName

func (fd *DeviceFD) StateTypeName() string

func (*DeviceFD) Write

func (fd *DeviceFD) Write(ctx context.Context, src usermem.IOSequence, opts vfs.WriteOptions) (int64, error)

Write implements vfs.FileDescriptionImpl.Write.

type FilesystemType

type FilesystemType struct{}

FilesystemType implements vfs.FilesystemType.

+stateify savable

func (FilesystemType) GetFilesystem

func (fsType FilesystemType) GetFilesystem(ctx context.Context, vfsObj *vfs.VirtualFilesystem, creds *auth.Credentials, source string, opts vfs.GetFilesystemOptions) (*vfs.Filesystem, *vfs.Dentry, error)

GetFilesystem implements vfs.FilesystemType.GetFilesystem.

func (FilesystemType) Name

func (FilesystemType) Name() string

Name implements vfs.FilesystemType.Name.

func (FilesystemType) Release

func (FilesystemType) Release(ctx context.Context)

Release implements vfs.FilesystemType.Release.

func (*FilesystemType) StateFields

func (fsType *FilesystemType) StateFields() []string

func (*FilesystemType) StateLoad

func (fsType *FilesystemType) StateLoad(stateSourceObject state.Source)

+checklocksignore

func (*FilesystemType) StateSave

func (fsType *FilesystemType) StateSave(stateSinkObject state.Sink)

+checklocksignore

func (*FilesystemType) StateTypeName

func (fsType *FilesystemType) StateTypeName() string

type Request

type Request struct {
	// contains filtered or unexported fields
}

Request represents a FUSE operation request that hasn't been sent to the server yet.

+stateify savable

func (*Request) Next

func (e *Request) Next() *Request

Next returns the entry that follows e in the list.

func (*Request) Prev

func (e *Request) Prev() *Request

Prev returns the entry that precedes e in the list.

func (*Request) SetNext

func (e *Request) SetNext(elem *Request)

SetNext assigns 'entry' as the entry that follows e in the list.

func (*Request) SetPrev

func (e *Request) SetPrev(elem *Request)

SetPrev assigns 'entry' as the entry that precedes e in the list.

func (*Request) StateFields

func (r *Request) StateFields() []string

func (*Request) StateLoad

func (r *Request) StateLoad(stateSourceObject state.Source)

+checklocksignore

func (*Request) StateSave

func (r *Request) StateSave(stateSinkObject state.Sink)

+checklocksignore

func (*Request) StateTypeName

func (r *Request) StateTypeName() string

type Response

type Response struct {
	// contains filtered or unexported fields
}

Response represents an actual response from the server, including the response payload.

+stateify savable

func (*Response) DataLen

func (r *Response) DataLen() uint32

DataLen returns the size of the response without the header.

func (*Response) Error

func (r *Response) Error() error

Error returns the error of the FUSE call.

func (*Response) StateFields

func (r *Response) StateFields() []string

func (*Response) StateLoad

func (r *Response) StateLoad(stateSourceObject state.Source)

+checklocksignore

func (*Response) StateSave

func (r *Response) StateSave(stateSinkObject state.Sink)

+checklocksignore

func (*Response) StateTypeName

func (r *Response) StateTypeName() string

func (*Response) UnmarshalPayload

func (r *Response) UnmarshalPayload(m marshal.Marshallable) error

UnmarshalPayload unmarshals the response data into m.

Jump to

Keyboard shortcuts

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