Documentation/filesystems/mount_api.rst
Source file repositories/reference/linux-study-clean/Documentation/filesystems/mount_api.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/filesystems/mount_api.rst- Extension
.rst- Size
- 26875 bytes
- Lines
- 806
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct fs_contextstruct fs_context_operationsstruct fs_parameter_descriptionstruct fs_parameter_specstruct fs_parameter_enumstruct constant_table
Annotated Snippet
struct fs_context {
const struct fs_context_operations *ops;
struct file_system_type *fs_type;
void *fs_private;
struct dentry *root;
struct user_namespace *user_ns;
struct net *net_ns;
const struct cred *cred;
char *source;
char *subtype;
void *security;
void *s_fs_info;
unsigned int sb_flags;
unsigned int sb_flags_mask;
unsigned int s_iflags;
enum fs_context_purpose purpose:8;
...
};
The fs_context fields are as follows:
* ::
const struct fs_context_operations *ops
These are operations that can be done on a filesystem context (see
below). This must be set by the ->init_fs_context() file_system_type
operation.
* ::
struct file_system_type *fs_type
A pointer to the file_system_type of the filesystem that is being
constructed or reconfigured. This retains a reference on the type owner.
* ::
void *fs_private
A pointer to the file system's private data. This is where the filesystem
will need to store any options it parses.
* ::
struct dentry *root
A pointer to the root of the mountable tree (and indirectly, the
superblock thereof). This is filled in by the ->get_tree() op. If this
is set, an active reference on root->d_sb must also be held.
* ::
struct user_namespace *user_ns
struct net *net_ns
There are a subset of the namespaces in use by the invoking process. They
retain references on each namespace. The subscribed namespaces may be
replaced by the filesystem to reflect other sources, such as the parent
mount superblock on an automount.
* ::
const struct cred *cred
The mounter's credentials. This retains a reference on the credentials.
* ::
char *source
Annotation
- Detected declarations: `struct fs_context`, `struct fs_context_operations`, `struct fs_parameter_description`, `struct fs_parameter_spec`, `struct fs_parameter_enum`, `struct constant_table`.
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.