Documentation ¶
Overview ¶
Package overlay provides an overlay filesystem implementation, which synthesizes a filesystem by composing one or more immutable filesystems ("lower layers") with an optional mutable filesystem ("upper layer").
Lock order:
directoryFD.mu / regularFileFD.mu filesystem.renameMu dentry.dirMu dentry.copyMu filesystem.devMu *** "memmap.Mappable locks" below this point dentry.mapsMu *** "memmap.Mappable locks taken by Translate" below this point dentry.dataMu
Locking dentry.dirMu in multiple dentries requires that parent dentries are locked before child dentries, and that filesystem.renameMu is locked to stabilize this relationship.
Index ¶
Constants ¶
const Name = "overlay"
Name is the default filesystem name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilesystemOptions ¶
type FilesystemOptions struct { // If UpperRoot.Ok(), it is the root of the writable upper layer of the // overlay. UpperRoot vfs.VirtualDentry // LowerRoots contains the roots of the immutable lower layers of the // overlay. LowerRoots is immutable. LowerRoots []vfs.VirtualDentry }
FilesystemOptions may be passed as vfs.GetFilesystemOptions.InternalData to FilesystemType.GetFilesystem.
+stateify savable
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 FilesystemType.Release.