include/uapi/linux/nilfs2_ondisk.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/nilfs2_ondisk.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/nilfs2_ondisk.h- Extension
.h- Size
- 18491 bytes
- Lines
- 684
- 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/types.hlinux/magic.hasm/byteorder.h
Detected Declarations
struct nilfs_inodestruct nilfs_super_rootstruct nilfs_super_blockstruct nilfs_dir_entrystruct nilfs_finfostruct nilfs_binfo_vstruct nilfs_binfo_datstruct nilfs_segment_summarystruct nilfs_btree_nodestruct nilfs_direct_nodestruct nilfs_palloc_group_descstruct nilfs_dat_entrystruct nilfs_snapshot_liststruct nilfs_checkpointstruct nilfs_cpfile_headerstruct nilfs_segment_usagestruct nilfs_sufile_headerfunction nilfs_segment_usage_set_cleanfunction nilfs_segment_usage_clean
Annotated Snippet
struct nilfs_inode {
__le64 i_blocks;
__le64 i_size;
__le64 i_ctime;
__le64 i_mtime;
__le32 i_ctime_nsec;
__le32 i_mtime_nsec;
__le32 i_uid;
__le32 i_gid;
__le16 i_mode;
__le16 i_links_count;
__le32 i_flags;
__le64 i_bmap[NILFS_INODE_BMAP_SIZE];
#define i_device_code i_bmap[0]
__le64 i_xattr;
__le32 i_generation;
__le32 i_pad;
};
#define NILFS_MIN_INODE_SIZE 128
/**
* struct nilfs_super_root - structure of super root
* @sr_sum: check sum
* @sr_bytes: byte count of the structure
* @sr_flags: flags (reserved)
* @sr_nongc_ctime: write time of the last segment not for cleaner operation
* @sr_dat: DAT file inode
* @sr_cpfile: checkpoint file inode
* @sr_sufile: segment usage file inode
*/
struct nilfs_super_root {
__le32 sr_sum;
__le16 sr_bytes;
__le16 sr_flags;
__le64 sr_nongc_ctime;
struct nilfs_inode sr_dat;
struct nilfs_inode sr_cpfile;
struct nilfs_inode sr_sufile;
};
#define NILFS_SR_MDT_OFFSET(inode_size, i) \
((unsigned long)&((struct nilfs_super_root *)0)->sr_dat + \
(inode_size) * (i))
#define NILFS_SR_DAT_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 0)
#define NILFS_SR_CPFILE_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 1)
#define NILFS_SR_SUFILE_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 2)
#define NILFS_SR_BYTES(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 3)
/*
* Maximal mount counts
*/
#define NILFS_DFL_MAX_MNT_COUNT 50 /* 50 mounts */
/*
* File system states (sbp->s_state, nilfs->ns_mount_state)
*/
#define NILFS_VALID_FS 0x0001 /* Unmounted cleanly */
#define NILFS_ERROR_FS 0x0002 /* Errors detected */
#define NILFS_RESIZE_FS 0x0004 /* Resize required */
/*
* Mount flags (sbi->s_mount_opt)
*/
#define NILFS_MOUNT_ERROR_MODE 0x0070 /* Error mode mask */
#define NILFS_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */
#define NILFS_MOUNT_ERRORS_RO 0x0020 /* Remount fs ro on errors */
#define NILFS_MOUNT_ERRORS_PANIC 0x0040 /* Panic on errors */
#define NILFS_MOUNT_BARRIER 0x1000 /* Use block barriers */
#define NILFS_MOUNT_STRICT_ORDER 0x2000 /*
* Apply strict in-order
* semantics also for data
*/
#define NILFS_MOUNT_NORECOVERY 0x4000 /*
* Disable write access during
* mount-time recovery
*/
#define NILFS_MOUNT_DISCARD 0x8000 /* Issue DISCARD requests */
/**
* struct nilfs_super_block - structure of super block on disk
* @s_rev_level: Revision level
* @s_minor_rev_level: minor revision level
* @s_magic: Magic signature
* @s_bytes: Bytes count of CRC calculation for
* this structure. s_reserved is excluded.
* @s_flags: flags
* @s_crc_seed: Seed value of CRC calculation
* @s_sum: Check sum of super block
Annotation
- Immediate include surface: `linux/types.h`, `linux/magic.h`, `asm/byteorder.h`.
- Detected declarations: `struct nilfs_inode`, `struct nilfs_super_root`, `struct nilfs_super_block`, `struct nilfs_dir_entry`, `struct nilfs_finfo`, `struct nilfs_binfo_v`, `struct nilfs_binfo_dat`, `struct nilfs_segment_summary`, `struct nilfs_btree_node`, `struct nilfs_direct_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.