include/linux/f2fs_fs.h
Source file repositories/reference/linux-study-clean/include/linux/f2fs_fs.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/f2fs_fs.h- Extension
.h- Size
- 21561 bytes
- Lines
- 628
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/pagemap.hlinux/types.h
Detected Declarations
struct f2fs_devicestruct f2fs_super_blockstruct f2fs_checkpointstruct f2fs_orphan_blockstruct f2fs_extentstruct node_footerstruct f2fs_inodestruct direct_nodestruct indirect_nodestruct f2fs_nodestruct f2fs_nat_entrystruct f2fs_nat_blockstruct f2fs_sit_entrystruct f2fs_sit_blockstruct f2fs_summarystruct summary_footerstruct nat_journal_entrystruct nat_journalstruct sit_journal_entrystruct sit_journalstruct f2fs_extra_infostruct f2fs_journalstruct f2fs_summary_blockstruct f2fs_dir_entrystruct f2fs_dentry_blockenum stop_cp_reasonenum f2fs_error
Annotated Snippet
struct f2fs_device {
__u8 path[MAX_PATH_LEN];
__le32 total_segments;
} __packed;
/* reason of stop_checkpoint */
enum stop_cp_reason {
STOP_CP_REASON_SHUTDOWN,
STOP_CP_REASON_FAULT_INJECT,
STOP_CP_REASON_META_PAGE,
STOP_CP_REASON_WRITE_FAIL,
STOP_CP_REASON_CORRUPTED_SUMMARY,
STOP_CP_REASON_UPDATE_INODE,
STOP_CP_REASON_FLUSH_FAIL,
STOP_CP_REASON_NO_SEGMENT,
STOP_CP_REASON_CORRUPTED_FREE_BITMAP,
STOP_CP_REASON_CORRUPTED_NID,
STOP_CP_REASON_READ_META,
STOP_CP_REASON_READ_NODE,
STOP_CP_REASON_READ_DATA,
STOP_CP_REASON_MAX,
};
#define MAX_STOP_REASON 32
/* detail reason for EFSCORRUPTED */
enum f2fs_error {
ERROR_CORRUPTED_CLUSTER,
ERROR_FAIL_DECOMPRESSION,
ERROR_INVALID_BLKADDR,
ERROR_CORRUPTED_DIRENT,
ERROR_CORRUPTED_INODE,
ERROR_INCONSISTENT_SUMMARY,
ERROR_INCONSISTENT_FOOTER,
ERROR_INCONSISTENT_SUM_TYPE,
ERROR_CORRUPTED_JOURNAL,
ERROR_INCONSISTENT_NODE_COUNT,
ERROR_INCONSISTENT_BLOCK_COUNT,
ERROR_INVALID_CURSEG,
ERROR_INCONSISTENT_SIT,
ERROR_CORRUPTED_VERITY_XATTR,
ERROR_CORRUPTED_XATTR,
ERROR_INVALID_NODE_REFERENCE,
ERROR_INCONSISTENT_NAT,
ERROR_MAX,
};
#define MAX_F2FS_ERRORS 16
struct f2fs_super_block {
__le32 magic; /* Magic Number */
__le16 major_ver; /* Major Version */
__le16 minor_ver; /* Minor Version */
__le32 log_sectorsize; /* log2 sector size in bytes */
__le32 log_sectors_per_block; /* log2 # of sectors per block */
__le32 log_blocksize; /* log2 block size in bytes */
__le32 log_blocks_per_seg; /* log2 # of blocks per segment */
__le32 segs_per_sec; /* # of segments per section */
__le32 secs_per_zone; /* # of sections per zone */
__le32 checksum_offset; /* checksum offset inside super block */
__le64 block_count; /* total # of user blocks */
__le32 section_count; /* total # of sections */
__le32 segment_count; /* total # of segments */
__le32 segment_count_ckpt; /* # of segments for checkpoint */
__le32 segment_count_sit; /* # of segments for SIT */
__le32 segment_count_nat; /* # of segments for NAT */
__le32 segment_count_ssa; /* # of segments for SSA */
__le32 segment_count_main; /* # of segments for main area */
__le32 segment0_blkaddr; /* start block address of segment 0 */
__le32 cp_blkaddr; /* start block address of checkpoint */
__le32 sit_blkaddr; /* start block address of SIT */
__le32 nat_blkaddr; /* start block address of NAT */
__le32 ssa_blkaddr; /* start block address of SSA */
__le32 main_blkaddr; /* start block address of main area */
__le32 root_ino; /* root inode number */
__le32 node_ino; /* node inode number */
__le32 meta_ino; /* meta inode number */
__u8 uuid[16]; /* 128-bit uuid for volume */
__le16 volume_name[MAX_VOLUME_NAME]; /* volume name */
__le32 extension_count; /* # of extensions below */
__u8 extension_list[F2FS_MAX_EXTENSION][F2FS_EXTENSION_LEN];/* extension array */
__le32 cp_payload;
__u8 version[VERSION_LEN]; /* the kernel version */
__u8 init_version[VERSION_LEN]; /* the initial kernel version */
__le32 feature; /* defined features */
__u8 encryption_level; /* versioning level for encryption */
__u8 encrypt_pw_salt[16]; /* Salt used for string2key algorithm */
struct f2fs_device devs[MAX_DEVICES]; /* device list */
__le32 qf_ino[F2FS_MAX_QUOTAS]; /* quota inode numbers */
__u8 hot_ext_count; /* # of hot file extension */
Annotation
- Immediate include surface: `linux/pagemap.h`, `linux/types.h`.
- Detected declarations: `struct f2fs_device`, `struct f2fs_super_block`, `struct f2fs_checkpoint`, `struct f2fs_orphan_block`, `struct f2fs_extent`, `struct node_footer`, `struct f2fs_inode`, `struct direct_node`, `struct indirect_node`, `struct f2fs_node`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
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.