Module vfs

Module vfs 

Source

Re-exports§

pub use buffers::*;
pub use memory_directory::*;
pub use path::*;
pub use pidfd::*;

Modules§

aio
buffers
eventfd
file_server
fs_args
fs_node_cache
fs_registry
fsverity
inotify
io_uring
memory_directory
path
pidfd
pipe
pseudo
rw_queue
socket
syscalls
timer

Macros§

fileops_impl_dataless
fileops_impl_delegate_read_and_seek
fileops_impl_directory
Implements FileOps methods in a way that makes sense for directories. You must implement FileOps::seek and FileOps::readdir.
fileops_impl_memory
fileops_impl_nonseekable
Implements FileOps methods in a way that makes sense for non-seekable files.
fileops_impl_noop_sync
fileops_impl_seekable
Implements FileOps::seek in a way that makes sense for seekable files.
fileops_impl_seekless
Implements FileOps::seek methods in a way that makes sense for files that ignore seeking operations and always read/write at offset 0.
fileops_impl_unbounded_seek
fs_node_impl_dir_readonly
fs_node_impl_not_dir
Stubs out FsNodeOps methods that only apply to directories.
fs_node_impl_symlink
Implements FsNodeOps methods in a way that makes sense for symlinks. You must implement FsNodeOps::readlink.
fs_node_impl_xattr_delegate
Implements extended attribute ops for FsNodeOps by delegating to another object which implements the XattrStorage trait or a similar interface. For example:

Structs§

ActiveNamespaceNode
A namespace node that keeps the underly mount busy.
AlreadyLockedAppendLockStrategy
Anon
CacheConfig
Configuration for CacheMode::Cached.
CallbackSymlinkNode
A SymlinkNode that uses a callback.
DefaultDirEntryOps
DirEntry
An entry in a directory.
DirEntryState
DirectoryEntryType
DirentSink32
DirentSink64
DowncastedFile
A FileObject with the type of its FileOps known. Dereferencing it returns the FileOps.
EpollEventHandler
EpollFileObject
EpollFileObject represents the FileObject used to implement epoll_create1/epoll_ctl/epoll_pwait.
FdFlags
FdNumber
FdTable
An FdTable is a table of file descriptors.
FdTableId
An identifier for an FdTable.
FileMapping
FileObject
A session with a file object.
FileObjectId
FileObjectState
FileSystem
A file system that can be mounted in a namespace.
FileSystemOptions
FileWriteGuardState
FlockOperation
FsContext
The file system context associated with a task.
FsNode
FsNodeInfo
LookupContext
The context passed during namespace lookups.
MemoryRegularFile
MemoryRegularNode
MemoryXattrStorage
Mount
An instance of a filesystem mounted in a namespace.
MountInfo
Public representation of the mount options.
MountNamespaceFile
MountState
Mounts
Tracks all mounts, keyed by mount point.
Namespace
A mount namespace.
NamespaceNode
A node in a mount namespace.
OPathOps
ProcMountinfoFile
ProcMountsFile
ProxyFileOps
RecordLocks
RecordLocksState
RenameFlags
SpecialNode
StatxFlags
SymlinkNode
A node that represents a symlink to another node.
UserFaultFile
WdNumber
Watch descriptor returned by inotify_add_watch(2).

Enums§

AppendLockGuard
CacheMode
CheckAccessReason
FallocMode
FileAsyncOwner
FileObjectReleaserAction
FileWriteGuardMode
FsNodeLinkBehavior
FsNodeReleaserAction
PathWithReachability
Whether the path is reachable from the given root.
RecordLockCommand
RecordLockOwner
ResolveBase
Used to specify base directory in LookupContext for lookups originating in the openat2 syscall with either RESOLVE_BENEATH or RESOLVE_IN_ROOT flag.
SeekTarget
SymlinkMode
The SymlinkMode enum encodes how symlinks are followed during path traversal.
SymlinkTarget
TargetFdNumber
The target FdNumber for a duplicated file descriptor.
TimeUpdateType
UnlinkKind
ValueOrSize
Returns a value, or the size required to contains it.
WhatToMount
XattrOp

Constants§

AES256_KEY_SIZE
DEFAULT_BYTES_PER_BLOCK
st_blksize is measured in units of 512 bytes.
DEFAULT_LRU_CAPACITY
MAX_LFS_FILESIZE
MAX_SYMLINK_FOLLOWS
The maximum number of symlink traversals that can be made during path resolution.

Traits§

AppendLockStrategy
CloseFreeSafe
Marker trait for implementation of FileOps that do not need to implement close and can then pass a wrapper object as the FileOps implementation.
DirEntryOps
DirentSink
FileOps
Corresponds to struct file_operations in Linux, plus any filesystem-specific data.
FileSystemOps
The filesystem-implementation-specific data for FileSystem.
FsNodeOps
XattrStorage
Trait that objects can implement if they need to handle extended attribute storage. Allows delegating extended attribute operations in FsNodeOps to another object.

Functions§

anon_fs
canonicalize_ioctl_request
checked_add_offset_and_length
default_eof_offset
default_fcntl
default_ioctl
default_seek
Implement the seek method for a file. The computation from the end of the file must be provided through a callback.
new_memfd
unbounded_seek
Implement the seek method for a file without an upper bound on the resulting offset.

Type Aliases§

DirEntryHandle
DirEntryReadGuard
DirEntryStateMutRef
DirEntryStateRef
DirEntryWriteGuard
EpollKey
EpollKey acts as an key to a map of WaitObject. In reality it is a pointer to a FileHandle object.
FileHandle
FileHandleKey
FileReleaser
FileSystemHandle
FsNodeHandle
FsNodeReleaser
MountReadGuard
MountStateMutRef
MountStateRef
MountWriteGuard
WeakFileHandle
WeakFsNodeHandle