fs/nfs/flexfilelayout/flexfilelayout.c
Source file repositories/reference/linux-study-clean/fs/nfs/flexfilelayout/flexfilelayout.c
File Facts
- System
- Linux kernel
- Corpus path
fs/nfs/flexfilelayout/flexfilelayout.c- Extension
.c- Size
- 81266 bytes
- Lines
- 3037
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/nfs_fs.hlinux/nfs_mount.hlinux/nfs_page.hlinux/module.hlinux/file.hlinux/sched/mm.hlinux/sunrpc/metrics.hflexfilelayout.h../nfs4session.h../nfs4idmap.h../internal.h../delegation.h../nfs4trace.h../iostat.h../nfs.h../nfs42.h
Detected Declarations
enum nfs4_ff_op_typefunction ff_layout_alloc_layout_hdrfunction ff_layout_free_layout_hdrfunction list_for_each_entry_safefunction decode_pnfs_stateidfunction decode_deviceidfunction decode_nfs_fhfunction nfs_map_name_to_uidfunction ff_local_open_fhfunction ff_dss_match_fhfunction ff_mirror_match_fhfunction ff_mirror_match_devidfunction ff_layout_add_mirrorfunction ff_layout_remove_mirrorfunction ff_layout_free_mirrorfunction ff_layout_put_mirrorfunction ff_layout_free_mirror_arrayfunction _ff_layout_free_lsegfunction ff_lseg_match_mirrorsfunction ff_lseg_range_is_afterfunction ff_lseg_mergefunction ff_layout_add_lsegfunction ff_mirror_efficiency_sumfunction ff_layout_sort_mirrorsfunction ff_layout_alloc_lsegfunction ff_layout_free_lsegfunction calc_commit_idxfunction calc_mirror_idx_from_commitfunction calc_dss_id_from_commitfunction nfs4_ff_start_busy_timerfunction nfs4_ff_end_busy_timerfunction nfs4_ff_layoutstat_start_iofunction nfs4_ff_layout_stat_io_update_requestedfunction nfs4_ff_layout_stat_io_update_completedfunction nfs4_ff_layout_stat_io_start_readfunction nfs4_ff_layout_stat_io_end_readfunction nfs4_ff_layout_stat_io_start_writefunction nfs4_ff_layout_stat_io_end_writefunction ff_layout_mark_ds_unreachablefunction ff_layout_mark_ds_reachablefunction ff_layout_choose_ds_for_readfunction ff_layout_choose_any_ds_for_readfunction ff_layout_choose_valid_ds_for_readfunction ff_layout_choose_best_ds_for_readfunction ff_layout_get_ds_for_readfunction ff_layout_pg_get_readfunction ff_layout_lseg_is_stripedfunction ff_layout_pg_test
Annotated Snippet
module_init(nfs4flexfilelayout_init);
module_exit(nfs4flexfilelayout_exit);
module_param(io_maxretrans, ushort, 0644);
MODULE_PARM_DESC(io_maxretrans, "The number of times the NFSv4.1 client "
"retries an I/O request before returning an error. ");
Annotation
- Immediate include surface: `linux/nfs_fs.h`, `linux/nfs_mount.h`, `linux/nfs_page.h`, `linux/module.h`, `linux/file.h`, `linux/sched/mm.h`, `linux/sunrpc/metrics.h`, `flexfilelayout.h`.
- Detected declarations: `enum nfs4_ff_op_type`, `function ff_layout_alloc_layout_hdr`, `function ff_layout_free_layout_hdr`, `function list_for_each_entry_safe`, `function decode_pnfs_stateid`, `function decode_deviceid`, `function decode_nfs_fh`, `function nfs_map_name_to_uid`, `function ff_local_open_fh`, `function ff_dss_match_fh`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: integration 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.