fs

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BootstrapFile       string = "image/image.boot"
	LegacyBootstrapFile string = "image.boot"
	DummyMountpoint     string = "/dummy"
)
View Source
const MaxSuperBlockSize = 8 * 1024

RafsV6 layout: 1k + SuperBlock(128) + SuperBlockExtended(256) RafsV5 layout: 8K superblock So we only need to read the MaxSuperBlockSize size to include both v5 and v6 superblocks

Variables

This section is empty.

Functions

This section is empty.

Types

type Filesystem added in v0.3.0

type Filesystem struct {
	meta.FileSystemMeta
	// Managing all daemons serving filesystem.
	Manager *manager.Manager
	// contains filtered or unexported fields
}

func NewFileSystem added in v0.3.0

func NewFileSystem(ctx context.Context, opt ...NewFSOpt) (*Filesystem, error)

NewFileSystem initialize Filesystem instance TODO(chge): `Filesystem` abstraction is not suggestive. A snapshotter can mount many Rafs/Erofs file systems

func (*Filesystem) BootstrapFile added in v0.3.0

func (fs *Filesystem) BootstrapFile(id string) (string, error)

func (*Filesystem) CacheUsage added in v0.3.1

func (fs *Filesystem) CacheUsage(ctx context.Context, blobDigest string) (snapshots.Usage, error)

How much space the layer/blob cache filesystem is occupying The blob digest mush have `sha256:` prefixed, otherwise, throw errors.

func (*Filesystem) IsStargzDataLayer added in v0.3.0

func (fs *Filesystem) IsStargzDataLayer(ctx context.Context, labels map[string]string) (bool, string, string, *stargz.Blob)

func (*Filesystem) MergeStargzMetaLayer added in v0.3.0

func (fs *Filesystem) MergeStargzMetaLayer(ctx context.Context, s storage.Snapshot) error

func (*Filesystem) Mount added in v0.3.0

func (fs *Filesystem) Mount(snapshotID string, labels map[string]string) (err error)

Mount will be called when containerd snapshotter prepare remote snapshotter this method will fork nydus daemon and manage it in the internal store, and indexed by snapshotID It must set up all necessary resources during Mount procedure and revoke any step if necessary.

func (*Filesystem) MountPoint added in v0.3.0

func (fs *Filesystem) MountPoint(snapshotID string) (string, error)

func (*Filesystem) PrepareStargzMetaLayer added in v0.3.0

func (fs *Filesystem) PrepareStargzMetaLayer(ctx context.Context, blob *stargz.Blob, ref, layerDigest string, s storage.Snapshot, labels map[string]string) error

func (*Filesystem) RemoveCache added in v0.3.3

func (fs *Filesystem) RemoveCache(blobDigest string) error

func (*Filesystem) StargzEnabled added in v0.3.0

func (fs *Filesystem) StargzEnabled() bool

func (*Filesystem) StargzLayer added in v0.3.0

func (fs *Filesystem) StargzLayer(labels map[string]string) bool

func (*Filesystem) Teardown added in v0.4.0

func (fs *Filesystem) Teardown(ctx context.Context) error

Try to stop all the running daemons if they are not referenced by any snapshots Clean up resources along with the daemons.

func (*Filesystem) TryStopSharedDaemon added in v0.4.0

func (fs *Filesystem) TryStopSharedDaemon()

func (*Filesystem) Umount added in v0.3.0

func (fs *Filesystem) Umount(ctx context.Context, snapshotID string) error

func (*Filesystem) WaitUntilReady added in v0.3.0

func (fs *Filesystem) WaitUntilReady(snapshotID string) error

WaitUntilReady wait until daemon ready by snapshotID, it will wait until nydus domain socket established and the status of nydusd daemon must be ready

type NewFSOpt added in v0.3.0

type NewFSOpt func(d *Filesystem) error

func WithCacheManager added in v0.3.0

func WithCacheManager(cm *cache.Manager) NewFSOpt

func WithDaemonMode added in v0.3.0

func WithDaemonMode(daemonMode config.DaemonMode) NewFSOpt

func WithEnableStargz added in v0.3.0

func WithEnableStargz(enable bool) NewFSOpt

func WithFsDriver added in v0.3.0

func WithFsDriver(fsDriver string) NewFSOpt

func WithLogDir added in v0.3.0

func WithLogDir(dir string) NewFSOpt

func WithLogLevel added in v0.3.0

func WithLogLevel(logLevel string) NewFSOpt

func WithLogToStdout added in v0.3.0

func WithLogToStdout(logToStdout bool) NewFSOpt

func WithManager added in v0.4.0

func WithManager(pm *manager.Manager) NewFSOpt

func WithMeta added in v0.3.0

func WithMeta(root string) NewFSOpt

func WithNydusImageBinaryPath added in v0.3.0

func WithNydusImageBinaryPath(p string) NewFSOpt

func WithNydusdThreadNum added in v0.3.0

func WithNydusdThreadNum(nydusdThreadNum int) NewFSOpt

func WithRootMountpoint added in v0.4.0

func WithRootMountpoint(mountpoint string) NewFSOpt

func WithVPCRegistry added in v0.3.0

func WithVPCRegistry(vpcRegistry bool) NewFSOpt

func WithVerifier added in v0.3.0

func WithVerifier(verifier *signature.Verifier) NewFSOpt

Jump to

Keyboard shortcuts

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