include/uapi/linux/nilfs2_api.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/nilfs2_api.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/nilfs2_api.h- Extension
.h- Size
- 7579 bytes
- Lines
- 294
- 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/ioctl.h
Detected Declarations
struct nilfs_cpinfostruct nilfs_suinfostruct nilfs_suinfo_updatestruct nilfs_cpmodestruct nilfs_argvstruct nilfs_periodstruct nilfs_cpstatstruct nilfs_sustatstruct nilfs_vinfostruct nilfs_vdescstruct nilfs_bdescfunction nilfs_suinfo_clean
Annotated Snippet
struct nilfs_cpinfo {
__u32 ci_flags;
__u32 ci_pad;
__u64 ci_cno;
__u64 ci_create;
__u64 ci_nblk_inc;
__u64 ci_inodes_count;
__u64 ci_blocks_count;
__u64 ci_next;
};
/* checkpoint flags */
enum {
NILFS_CPINFO_SNAPSHOT,
NILFS_CPINFO_INVALID,
NILFS_CPINFO_SKETCH,
NILFS_CPINFO_MINOR,
};
#define NILFS_CPINFO_FNS(flag, name) \
static inline int \
nilfs_cpinfo_##name(const struct nilfs_cpinfo *cpinfo) \
{ \
return !!(cpinfo->ci_flags & (1UL << NILFS_CPINFO_##flag)); \
}
NILFS_CPINFO_FNS(SNAPSHOT, snapshot)
NILFS_CPINFO_FNS(INVALID, invalid)
NILFS_CPINFO_FNS(MINOR, minor)
/**
* struct nilfs_suinfo - segment usage information
* @sui_lastmod: timestamp of last modification
* @sui_nblocks: number of written blocks in segment
* @sui_flags: segment usage flags
*/
struct nilfs_suinfo {
__u64 sui_lastmod;
__u32 sui_nblocks;
__u32 sui_flags;
};
/* segment usage flags */
enum {
NILFS_SUINFO_ACTIVE,
NILFS_SUINFO_DIRTY,
NILFS_SUINFO_ERROR,
};
#define NILFS_SUINFO_FNS(flag, name) \
static inline int \
nilfs_suinfo_##name(const struct nilfs_suinfo *si) \
{ \
return si->sui_flags & (1UL << NILFS_SUINFO_##flag); \
}
NILFS_SUINFO_FNS(ACTIVE, active)
NILFS_SUINFO_FNS(DIRTY, dirty)
NILFS_SUINFO_FNS(ERROR, error)
static inline int nilfs_suinfo_clean(const struct nilfs_suinfo *si)
{
return !si->sui_flags;
}
/**
* struct nilfs_suinfo_update - segment usage information update
* @sup_segnum: segment number
* @sup_flags: flags for which fields are active in sup_sui
* @sup_reserved: reserved necessary for alignment
* @sup_sui: segment usage information
*/
struct nilfs_suinfo_update {
__u64 sup_segnum;
__u32 sup_flags;
__u32 sup_reserved;
struct nilfs_suinfo sup_sui;
};
enum {
NILFS_SUINFO_UPDATE_LASTMOD,
NILFS_SUINFO_UPDATE_NBLOCKS,
NILFS_SUINFO_UPDATE_FLAGS,
__NR_NILFS_SUINFO_UPDATE_FIELDS,
};
#define NILFS_SUINFO_UPDATE_FNS(flag, name) \
static inline void \
nilfs_suinfo_update_set_##name(struct nilfs_suinfo_update *sup) \
{ \
Annotation
- Immediate include surface: `linux/types.h`, `linux/ioctl.h`.
- Detected declarations: `struct nilfs_cpinfo`, `struct nilfs_suinfo`, `struct nilfs_suinfo_update`, `struct nilfs_cpmode`, `struct nilfs_argv`, `struct nilfs_period`, `struct nilfs_cpstat`, `struct nilfs_sustat`, `struct nilfs_vinfo`, `struct nilfs_vdesc`.
- 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.