fuse

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0, MIT Imports: 26 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 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) 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.

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

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) 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