include/uapi/linux/gfs2_ondisk.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/gfs2_ondisk.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/gfs2_ondisk.h- Extension
.h- Size
- 14769 bytes
- Lines
- 543
- 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.h
Detected Declarations
struct gfs2_inumstruct gfs2_meta_headerstruct gfs2_sbstruct gfs2_rindexstruct gfs2_inode_lvbstruct gfs2_rgrp_lvbstruct gfs2_rgrpstruct gfs2_quotastruct gfs2_dinodestruct gfs2_direntstruct gfs2_leafstruct gfs2_ea_headerstruct gfs2_log_headerstruct gfs2_log_descriptorstruct gfs2_inum_rangestruct gfs2_statfs_changestruct gfs2_quota_changestruct gfs2_quota_lvb
Annotated Snippet
struct gfs2_inum {
__be64 no_formal_ino;
__be64 no_addr;
};
/*
* Generic metadata head structure
* Every inplace buffer logged in the journal must start with this.
*/
#define GFS2_METATYPE_NONE 0
#define GFS2_METATYPE_SB 1
#define GFS2_METATYPE_RG 2
#define GFS2_METATYPE_RB 3
#define GFS2_METATYPE_DI 4
#define GFS2_METATYPE_IN 5
#define GFS2_METATYPE_LF 6
#define GFS2_METATYPE_JD 7
#define GFS2_METATYPE_LH 8
#define GFS2_METATYPE_LD 9
#define GFS2_METATYPE_LB 12
#define GFS2_METATYPE_EA 10
#define GFS2_METATYPE_ED 11
#define GFS2_METATYPE_QC 14
struct gfs2_meta_header {
__be32 mh_magic;
__be32 mh_type;
__be64 __pad0; /* Was generation number in gfs1 */
__be32 mh_format;
/* This union is to keep userspace happy */
union {
__be32 mh_jid; /* Was incarnation number in gfs1 */
__be32 __pad1;
};
};
/*
* super-block structure
*
* It's probably good if SIZEOF_SB <= GFS2_BASIC_BLOCK (512 bytes)
*
* Order is important, need to be able to read old superblocks to do on-disk
* version upgrades.
*/
/* Address of superblock in GFS2 basic blocks */
#define GFS2_SB_ADDR 128
/* The lock number for the superblock (must be zero) */
#define GFS2_SB_LOCK 0
/* Requirement: GFS2_LOCKNAME_LEN % 8 == 0
Includes: the fencing zero at the end */
#define GFS2_LOCKNAME_LEN 64
struct gfs2_sb {
struct gfs2_meta_header sb_header;
__be32 sb_fs_format;
__be32 sb_multihost_format;
__u32 __pad0; /* Was superblock flags in gfs1 */
__be32 sb_bsize;
__be32 sb_bsize_shift;
__u32 __pad1; /* Was journal segment size in gfs1 */
struct gfs2_inum sb_master_dir; /* Was jindex dinode in gfs1 */
struct gfs2_inum __pad2; /* Was rindex dinode in gfs1 */
struct gfs2_inum sb_root_dir;
char sb_lockproto[GFS2_LOCKNAME_LEN];
char sb_locktable[GFS2_LOCKNAME_LEN];
struct gfs2_inum __pad3; /* Was quota inode in gfs1 */
struct gfs2_inum __pad4; /* Was licence inode in gfs1 */
#define GFS2_HAS_UUID 1
__u8 sb_uuid[16]; /* The UUID, maybe 0 for backwards compat */
};
/*
* resource index structure
*/
struct gfs2_rindex {
__be64 ri_addr; /* grp block disk address */
__be32 ri_length; /* length of rgrp header in fs blocks */
__u32 __pad;
__be64 ri_data0; /* first data location */
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct gfs2_inum`, `struct gfs2_meta_header`, `struct gfs2_sb`, `struct gfs2_rindex`, `struct gfs2_inode_lvb`, `struct gfs2_rgrp_lvb`, `struct gfs2_rgrp`, `struct gfs2_quota`, `struct gfs2_dinode`, `struct gfs2_dirent`.
- 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.