fs/jfs/jfs_types.h
Source file repositories/reference/linux-study-clean/fs/jfs/jfs_types.h
File Facts
- System
- Linux kernel
- Corpus path
fs/jfs/jfs_types.h- Extension
.h- Size
- 3682 bytes
- Lines
- 158
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- 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/nls.h
Detected Declarations
struct timestruc_tstruct pxdliststruct component_namestruct dasdfunction PXDlengthfunction PXDaddressfunction lengthPXDfunction addressPXD
Annotated Snippet
struct timestruc_t {
__le32 tv_sec;
__le32 tv_nsec;
};
/*
* handy
*/
#define LEFTMOSTONE 0x80000000
#define HIGHORDER 0x80000000u /* high order bit on */
#define ONES 0xffffffffu /* all bit on */
/*
* physical xd (pxd)
*
* The leftmost 24 bits of len_addr are the extent length.
* The rightmost 8 bits of len_addr are the most signficant bits of
* the extent address
*/
typedef struct {
__le32 len_addr;
__le32 addr2;
} pxd_t;
/* xd_t field construction */
static inline void PXDlength(pxd_t *pxd, __u32 len)
{
pxd->len_addr = (pxd->len_addr & cpu_to_le32(~0xffffff)) |
cpu_to_le32(len & 0xffffff);
}
static inline void PXDaddress(pxd_t *pxd, __u64 addr)
{
pxd->len_addr = (pxd->len_addr & cpu_to_le32(0xffffff)) |
cpu_to_le32((addr >> 32)<<24);
pxd->addr2 = cpu_to_le32(addr & 0xffffffff);
}
/* xd_t field extraction */
static inline __u32 lengthPXD(pxd_t *pxd)
{
return le32_to_cpu((pxd)->len_addr) & 0xffffff;
}
static inline __u64 addressPXD(pxd_t *pxd)
{
__u64 n = le32_to_cpu(pxd->len_addr) & ~0xffffff;
return (n << 8) + le32_to_cpu(pxd->addr2);
}
#define MAXTREEHEIGHT 8
/* pxd list */
struct pxdlist {
s16 maxnpxd;
s16 npxd;
pxd_t pxd[MAXTREEHEIGHT];
};
/*
* data extent descriptor (dxd)
*/
typedef struct {
__u8 flag; /* 1: flags */
__u8 rsrvd[3];
__le32 size; /* 4: size in byte */
pxd_t loc; /* 8: address and length in unit of fsblksize */
} dxd_t; /* - 16 - */
/* dxd_t flags */
#define DXD_INDEX 0x80 /* B+-tree index */
#define DXD_INLINE 0x40 /* in-line data extent */
#define DXD_EXTENT 0x20 /* out-of-line single extent */
#define DXD_FILE 0x10 /* out-of-line file (inode) */
#define DXD_CORRUPT 0x08 /* Inconsistency detected */
/* dxd_t field construction
*/
#define DXDlength(dxd, len) PXDlength(&(dxd)->loc, len)
#define DXDaddress(dxd, addr) PXDaddress(&(dxd)->loc, addr)
#define lengthDXD(dxd) lengthPXD(&(dxd)->loc)
#define addressDXD(dxd) addressPXD(&(dxd)->loc)
#define DXDsize(dxd, size32) ((dxd)->size = cpu_to_le32(size32))
#define sizeDXD(dxd) le32_to_cpu((dxd)->size)
/*
* directory entry argument
*/
Annotation
- Immediate include surface: `linux/types.h`, `linux/nls.h`.
- Detected declarations: `struct timestruc_t`, `struct pxdlist`, `struct component_name`, `struct dasd`, `function PXDlength`, `function PXDaddress`, `function lengthPXD`, `function addressPXD`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- 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.