include/linux/ceph/striper.h
Source file repositories/reference/linux-study-clean/include/linux/ceph/striper.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/ceph/striper.h- Extension
.h- Size
- 1781 bytes
- Lines
- 72
- 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/list.hlinux/types.h
Detected Declarations
struct ceph_file_layoutstruct ceph_object_extentstruct ceph_file_extentfunction ceph_object_extent_initfunction ceph_file_extents_bytes
Annotated Snippet
struct ceph_object_extent {
struct list_head oe_item;
u64 oe_objno;
u64 oe_off;
u64 oe_len;
};
static inline void ceph_object_extent_init(struct ceph_object_extent *ex)
{
INIT_LIST_HEAD(&ex->oe_item);
}
/*
* Called for each mapped stripe unit.
*
* @bytes: number of bytes mapped, i.e. the minimum of the full length
* requested (file extent length) or the remainder of the stripe
* unit within an object
*/
typedef void (*ceph_object_extent_fn_t)(struct ceph_object_extent *ex,
u32 bytes, void *arg);
int ceph_file_to_extents(struct ceph_file_layout *l, u64 off, u64 len,
struct list_head *object_extents,
struct ceph_object_extent *alloc_fn(void *arg),
void *alloc_arg,
ceph_object_extent_fn_t action_fn,
void *action_arg);
int ceph_iterate_extents(struct ceph_file_layout *l, u64 off, u64 len,
struct list_head *object_extents,
ceph_object_extent_fn_t action_fn,
void *action_arg);
struct ceph_file_extent {
u64 fe_off;
u64 fe_len;
};
static inline u64 ceph_file_extents_bytes(struct ceph_file_extent *file_extents,
u32 num_file_extents)
{
u64 bytes = 0;
u32 i;
for (i = 0; i < num_file_extents; i++)
bytes += file_extents[i].fe_len;
return bytes;
}
int ceph_extent_to_file(struct ceph_file_layout *l,
u64 objno, u64 objoff, u64 objlen,
struct ceph_file_extent **file_extents,
u32 *num_file_extents);
u64 ceph_get_num_objects(struct ceph_file_layout *l, u64 size);
#endif
Annotation
- Immediate include surface: `linux/list.h`, `linux/types.h`.
- Detected declarations: `struct ceph_file_layout`, `struct ceph_object_extent`, `struct ceph_file_extent`, `function ceph_object_extent_init`, `function ceph_file_extents_bytes`.
- 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.