mountfd

package
v0.0.0-...-5c0fc10 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 3 Imported by: 0

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.

func (*Fd) Release

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

Release implements vfs.FileDescriptionImpl.Release.

Jump to

Keyboard shortcuts

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