fs/nfs/flexfilelayout/flexfilelayout.h
Source file repositories/reference/linux-study-clean/fs/nfs/flexfilelayout/flexfilelayout.h
File Facts
- System
- Linux kernel
- Corpus path
fs/nfs/flexfilelayout/flexfilelayout.h- Extension
.h- Size
- 6900 bytes
- Lines
- 254
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/refcount.h../pnfs.h
Detected Declarations
struct nfs4_ff_ds_versionstruct nfs4_ff_layout_dsstruct nfs4_ff_layout_ds_errstruct nfs4_ff_io_statstruct nfs4_ff_busy_timerstruct nfs4_ff_layoutstatstruct nfs4_ff_layout_mirrorstruct nfs4_ff_layout_ds_stripestruct nfs4_ff_layout_mirrorstruct nfs4_ff_layout_segmentstruct nfs4_flexfile_layoutstruct nfs4_flexfile_layoutreturn_argsfunction FF_LAYOUT_FROM_HDRfunction FF_LAYOUT_LSEGfunction FF_LAYOUT_MIRROR_DSfunction FF_LAYOUT_COMPfunction FF_LAYOUT_DEVID_NODEfunction FF_LAYOUT_MIRROR_COUNTfunction ff_layout_no_fallback_to_mdsfunction ff_layout_no_read_on_rwfunction nfs4_ff_layout_ds_versionfunction nfs4_ff_layout_calc_dss_id
Annotated Snippet
struct nfs4_ff_ds_version {
u32 version;
u32 minor_version;
u32 rsize;
u32 wsize;
bool tightly_coupled;
};
/* chained in global deviceid hlist */
struct nfs4_ff_layout_ds {
struct nfs4_deviceid_node id_node;
u32 ds_versions_cnt;
struct nfs4_ff_ds_version *ds_versions;
struct nfs4_pnfs_ds *ds;
};
struct nfs4_ff_layout_ds_err {
struct list_head list; /* linked in mirror error_list */
u64 offset;
u64 length;
int status;
enum nfs_opnum4 opnum;
nfs4_stateid stateid;
struct nfs4_deviceid deviceid;
};
struct nfs4_ff_io_stat {
__u64 ops_requested;
__u64 bytes_requested;
__u64 ops_completed;
__u64 bytes_completed;
__u64 bytes_not_delivered;
ktime_t total_busy_time;
ktime_t aggregate_completion_time;
};
struct nfs4_ff_busy_timer {
ktime_t start_time;
atomic_t n_ops;
};
struct nfs4_ff_layoutstat {
struct nfs4_ff_io_stat io_stat;
struct nfs4_ff_busy_timer busy_timer;
};
struct nfs4_ff_layout_mirror;
struct nfs4_ff_layout_ds_stripe {
struct nfs4_ff_layout_mirror *mirror;
struct nfs4_deviceid devid;
u32 efficiency;
struct nfs4_ff_layout_ds *mirror_ds;
u32 fh_versions_cnt;
struct nfs_fh *fh_versions;
nfs4_stateid stateid;
const struct cred __rcu *ro_cred;
const struct cred __rcu *rw_cred;
struct nfs_file_localio nfl;
struct nfs4_ff_layoutstat read_stat;
struct nfs4_ff_layoutstat write_stat;
ktime_t start_time;
};
struct nfs4_ff_layout_mirror {
struct pnfs_layout_hdr *layout;
struct list_head mirrors;
u32 dss_count;
struct nfs4_ff_layout_ds_stripe *dss;
refcount_t ref;
spinlock_t lock;
unsigned long flags;
u32 report_interval;
};
#define NFS4_FF_MIRROR_STAT_AVAIL (0)
struct nfs4_ff_layout_segment {
struct pnfs_layout_segment generic_hdr;
u64 stripe_unit;
u32 flags;
u32 mirror_array_cnt;
struct nfs4_ff_layout_mirror *mirror_array[] __counted_by(mirror_array_cnt);
};
struct nfs4_flexfile_layout {
struct pnfs_layout_hdr generic_hdr;
struct pnfs_ds_commit_info commit_info;
struct list_head mirrors;
struct list_head error_list; /* nfs4_ff_layout_ds_err */
Annotation
- Immediate include surface: `linux/refcount.h`, `../pnfs.h`.
- Detected declarations: `struct nfs4_ff_ds_version`, `struct nfs4_ff_layout_ds`, `struct nfs4_ff_layout_ds_err`, `struct nfs4_ff_io_stat`, `struct nfs4_ff_busy_timer`, `struct nfs4_ff_layoutstat`, `struct nfs4_ff_layout_mirror`, `struct nfs4_ff_layout_ds_stripe`, `struct nfs4_ff_layout_mirror`, `struct nfs4_ff_layout_segment`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.