Documentation
¶
Overview ¶
Package mountfd provides a "mount object" file descriptor, as returned by fsmount(2) or open_tree(2) with OPEN_TREE_CLONE.
A mount object fd can be used as an argument to move_mount(2) to place the mount on the directory tree, or it can be used as a dirfd argument to the *at() syscalls. If a mount object fd is closed without calling move_mount(2), the mount is unmounted.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(ctx context.Context, anonNS *vfs.MountNamespace, fileFlags uint32) (*vfs.FileDescription, error)
New creates a new mount object file descriptor from the anonymous mount namespace anonNs and the mount at the root of anonNS. Consumes a reference on anonNS.
Types ¶
type Fd ¶
type Fd struct {
vfs.FileDescriptionDefaultImpl
vfs.DentryMetadataFileDescriptionImpl
vfs.NoLockFD
// contains filtered or unexported fields
}
Fd represents a mount object file descriptor.
Click to show internal directories.
Click to hide internal directories.