package nsfs
import "gvisor.dev/gvisor/pkg/sentry/fsimpl/nsfs"
Package nsfs provides the filesystem implementation backing Kernel.NsfsMount.
Index ¶
- func NewFilesystem(vfsObj *vfs.VirtualFilesystem) (*vfs.Filesystem, error)
- type Inode
- func NewInode(ctx context.Context, mnt *vfs.Mount, namespace vfs.Namespace) *Inode
- func (i *Inode) DecRef(ctx context.Context)
- func (i *Inode) Keep() bool
- func (i *Inode) Mode() linux.FileMode
- func (i *Inode) Name() string
- func (i *Inode) Namespace() vfs.Namespace
- func (i *Inode) Open(ctx context.Context, rp *vfs.ResolvingPath, d *kernfs.Dentry, opts vfs.OpenOptions) (*vfs.FileDescription, error)
- func (i *Inode) SetStat(ctx context.Context, vfsfs *vfs.Filesystem, creds *auth.Credentials, opts vfs.SetStatOptions) error
- func (i *Inode) StatFS(ctx context.Context, fs *vfs.Filesystem) (linux.Statfs, error)
- func (i *Inode) VirtualDentry() vfs.VirtualDentry
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 ¶
type Inode struct { kernfs.InodeAttrs kernfs.InodeAnonymous kernfs.InodeNotDirectory kernfs.InodeNotSymlink kernfs.InodeWatches kernfs.InodeFSOwned // contains filtered or unexported fields }
Inode implements kernfs.Inode.
+stateify savable
func NewInode ¶
NewInode creates a new nsfs inode.
func (*Inode) DecRef ¶
DecRef implements kernfs.Inode.DecRef.
func (*Inode) Keep ¶
Keep implements kernfs.Inode.Keep.
func (*Inode) Mode ¶
Mode implements kernfs.Inode.Mode.
func (*Inode) Name ¶
Name returns the inode name that is used to implement readlink() of /proc/pid/ns/ files.
func (*Inode) Namespace ¶
Namespace returns the namespace associated with the inode.
func (*Inode) Open ¶
func (i *Inode) Open(ctx context.Context, rp *vfs.ResolvingPath, d *kernfs.Dentry, opts vfs.OpenOptions) (*vfs.FileDescription, error)
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 ¶
StatFS implements kernfs.Inode.StatFS.
func (*Inode) VirtualDentry ¶
func (i *Inode) VirtualDentry() vfs.VirtualDentry
VirtualDentry returns VirtualDentry for the inode.
Source Files ¶
nsfs.go
- Version
- v0.0.0-20250605235530-a6711d1e1dc6 (latest)
- Published
- Jun 5, 2025
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 4 hours ago –
Tools for package owners.