nsfs

package
v0.0.0-...-c27c9a0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: Apache-2.0, MIT Imports: 7 Imported by: 3

Documentation

Overview

Package nsfs provides the filesystem implementation backing Kernel.NsfsMount.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFilesystem

func NewFilesystem(vfsObj *vfs.VirtualFilesystem) (*vfs.Filesystem, error)

NewFilesystem sets up and returns a new vfs.Filesystem implemented by nsfs.

Types

type Inode

Inode implements kernfs.Inode.

+stateify savable

func NewInode

func NewInode(ctx context.Context, mnt *vfs.Mount, namespace vfs.Namespace) *Inode

NewInode creates a new nsfs inode.

func (*Inode) DecRef

func (i *Inode) DecRef(ctx context.Context)

DecRef implements kernfs.Inode.DecRef.

func (*Inode) Keep

func (i *Inode) Keep() bool

Keep implements kernfs.Inode.Keep.

func (*Inode) Mode

func (i *Inode) Mode() linux.FileMode

Mode implements kernfs.Inode.Mode.

func (*Inode) Name

func (i *Inode) Name() string

Name returns the inode name that is used to implement readlink() of /proc/pid/ns/ files.

func (*Inode) Namespace

func (i *Inode) Namespace() vfs.Namespace

Namespace returns the namespace associated with the inode.

func (*Inode) Open

Open implements kernfs.Inode.Open.

func (*Inode) SetStat

func (i *Inode) SetStat(ctx context.Context, vfsfs *vfs.Filesystem, creds *auth.Credentials, opts vfs.SetStatOptions) error

SetStat implements kernfs.Inode.SetStat.

Linux sets S_IMMUTABLE to nsfs inodes that prevents any attribute changes on them.

func (*Inode) StatFS

func (i *Inode) StatFS(ctx context.Context, fs *vfs.Filesystem) (linux.Statfs, error)

StatFS implements kernfs.Inode.StatFS.

func (*Inode) VirtualDentry

func (i *Inode) VirtualDentry() vfs.VirtualDentry

VirtualDentry returns VirtualDentry for the inode.

Jump to

Keyboard shortcuts

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