include/linux/ceph/ceph_fs.h
Source file repositories/reference/linux-study-clean/include/linux/ceph/ceph_fs.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/ceph/ceph_fs.h- Extension
.h- Size
- 29548 bytes
- Lines
- 919
- 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/ceph/msgr.hlinux/ceph/rados.h
Detected Declarations
struct ceph_file_layout_legacystruct ceph_stringstruct ceph_file_layoutstruct ceph_dir_layoutstruct ceph_mon_request_headerstruct ceph_mon_statfsstruct ceph_statfsstruct ceph_mon_statfs_replystruct ceph_mon_commandstruct ceph_osd_getmapstruct ceph_mds_getmapstruct ceph_client_mountstruct ceph_mon_subscribe_itemstruct ceph_mon_subscribe_ackstruct ceph_mds_session_headstruct ceph_mds_request_head_legacystruct ceph_mds_request_headstruct ceph_mds_request_releasestruct ceph_mds_reply_headstruct ceph_frag_tree_splitstruct ceph_frag_tree_headstruct ceph_mds_reply_capstruct ceph_mds_reply_inodestruct ceph_mds_reply_leasestruct ceph_mds_reply_dirfragstruct ceph_filelockstruct ceph_mds_capsstruct ceph_mds_cap_peerstruct ceph_mds_cap_releasestruct ceph_mds_cap_itemstruct ceph_mds_leasestruct ceph_mds_cap_reconnectstruct ceph_mds_cap_reconnect_v1struct ceph_mds_snaprealm_reconnectstruct ceph_mds_snap_headstruct ceph_mds_snap_realmstruct ceph_mds_quota
Annotated Snippet
struct ceph_file_layout_legacy {
/* file -> object mapping */
__le32 fl_stripe_unit; /* stripe unit, in bytes. must be multiple
of page size. */
__le32 fl_stripe_count; /* over this many objects */
__le32 fl_object_size; /* until objects are this big, then move to
new objects */
__le32 fl_cas_hash; /* UNUSED. 0 = none; 1 = sha256 */
/* pg -> disk layout */
__le32 fl_object_stripe_unit; /* UNUSED. for per-object parity, if any */
/* object -> pg layout */
__le32 fl_unused; /* unused; used to be preferred primary for pg (-1 for none) */
__le32 fl_pg_pool; /* namespace, crush ruleset, rep level */
} __attribute__ ((packed));
struct ceph_string;
/*
* ceph_file_layout - describe data layout for a file/inode
*/
struct ceph_file_layout {
/* file -> object mapping */
u32 stripe_unit; /* stripe unit, in bytes */
u32 stripe_count; /* over this many objects */
u32 object_size; /* until objects are this big */
s64 pool_id; /* rados pool id */
struct ceph_string __rcu *pool_ns; /* rados pool namespace */
};
extern int ceph_file_layout_is_valid(const struct ceph_file_layout *layout);
extern void ceph_file_layout_from_legacy(struct ceph_file_layout *fl,
struct ceph_file_layout_legacy *legacy);
extern void ceph_file_layout_to_legacy(struct ceph_file_layout *fl,
struct ceph_file_layout_legacy *legacy);
#define CEPH_MIN_STRIPE_UNIT 65536
struct ceph_dir_layout {
__u8 dl_dir_hash; /* see ceph_hash.h for ids */
__u8 dl_unused1;
__u16 dl_unused2;
__u32 dl_unused3;
} __attribute__ ((packed));
/* crypto algorithms */
#define CEPH_CRYPTO_NONE 0x0
#define CEPH_CRYPTO_AES 0x1
#define CEPH_CRYPTO_AES256KRB5 0x2 /* AES256-CTS-HMAC384-192 */
#define CEPH_AES_IV "cephsageyudagreg"
/* security/authentication protocols */
#define CEPH_AUTH_UNKNOWN 0x0
#define CEPH_AUTH_NONE 0x1
#define CEPH_AUTH_CEPHX 0x2
#define CEPH_AUTH_MODE_NONE 0
#define CEPH_AUTH_MODE_AUTHORIZER 1
#define CEPH_AUTH_MODE_MON 10
/* msgr2 protocol modes */
#define CEPH_CON_MODE_UNKNOWN 0x0
#define CEPH_CON_MODE_CRC 0x1
#define CEPH_CON_MODE_SECURE 0x2
#define CEPH_AUTH_UID_DEFAULT ((__u64) -1)
const char *ceph_auth_proto_name(int proto);
const char *ceph_con_mode_name(int mode);
/*********************************************
* message layer
*/
/*
* message types
*/
/* misc */
#define CEPH_MSG_SHUTDOWN 1
#define CEPH_MSG_PING 2
/* client <-> monitor */
#define CEPH_MSG_MON_MAP 4
#define CEPH_MSG_MON_GET_MAP 5
#define CEPH_MSG_STATFS 13
#define CEPH_MSG_STATFS_REPLY 14
#define CEPH_MSG_MON_SUBSCRIBE 15
#define CEPH_MSG_MON_SUBSCRIBE_ACK 16
Annotation
- Immediate include surface: `linux/ceph/msgr.h`, `linux/ceph/rados.h`.
- Detected declarations: `struct ceph_file_layout_legacy`, `struct ceph_string`, `struct ceph_file_layout`, `struct ceph_dir_layout`, `struct ceph_mon_request_header`, `struct ceph_mon_statfs`, `struct ceph_statfs`, `struct ceph_mon_statfs_reply`, `struct ceph_mon_command`, `struct ceph_osd_getmap`.
- 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.