include/linux/ceph/mon_client.h
Source file repositories/reference/linux-study-clean/include/linux/ceph/mon_client.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/ceph/mon_client.h- Extension
.h- Size
- 3937 bytes
- Lines
- 153
- 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/completion.hlinux/kref.hlinux/rbtree.hlinux/ceph/messenger.h
Detected Declarations
struct ceph_clientstruct ceph_mount_argsstruct ceph_auth_clientstruct ceph_monmapstruct ceph_mon_clientstruct ceph_mon_generic_requeststruct ceph_mon_requeststruct ceph_mon_generic_requeststruct ceph_mon_client
Annotated Snippet
struct ceph_monmap {
struct ceph_fsid fsid;
u32 epoch;
u32 num_mon;
struct ceph_entity_inst mon_inst[] __counted_by(num_mon);
};
struct ceph_mon_client;
struct ceph_mon_generic_request;
/*
* Generic mechanism for resending monitor requests.
*/
typedef void (*ceph_monc_request_func_t)(struct ceph_mon_client *monc,
int newmon);
/* a pending monitor request */
struct ceph_mon_request {
struct ceph_mon_client *monc;
struct delayed_work delayed_work;
unsigned long delay;
ceph_monc_request_func_t do_request;
};
typedef void (*ceph_monc_callback_t)(struct ceph_mon_generic_request *);
/*
* ceph_mon_generic_request is being used for the statfs and
* mon_get_version requests which are being done a bit differently
* because we need to get data back to the caller
*/
struct ceph_mon_generic_request {
struct ceph_mon_client *monc;
struct kref kref;
u64 tid;
struct rb_node node;
int result;
struct completion completion;
ceph_monc_callback_t complete_cb;
u64 private_data; /* r_tid/linger_id */
struct ceph_msg *request; /* original request */
struct ceph_msg *reply; /* and reply */
union {
struct ceph_statfs *st;
u64 newest;
} u;
};
struct ceph_mon_client {
struct ceph_client *client;
struct ceph_monmap *monmap;
struct mutex mutex;
struct delayed_work delayed_work;
struct ceph_auth_client *auth;
struct ceph_msg *m_auth, *m_auth_reply, *m_subscribe, *m_subscribe_ack;
int pending_auth;
bool hunting;
int cur_mon; /* last monitor i contacted */
unsigned long sub_renew_after;
unsigned long sub_renew_sent;
struct ceph_connection con;
bool had_a_connection;
int hunt_mult; /* [1..CEPH_MONC_HUNT_MAX_MULT] */
/* pending generic requests */
struct rb_root generic_request_tree;
u64 last_tid;
/* subs, indexed with CEPH_SUB_* */
struct {
struct ceph_mon_subscribe_item item;
bool want;
u32 have; /* epoch */
} subs[4];
int fs_cluster_id; /* "mdsmap.<id>" sub */
#ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_file;
#endif
};
extern int ceph_monmap_contains(struct ceph_monmap *m,
Annotation
- Immediate include surface: `linux/completion.h`, `linux/kref.h`, `linux/rbtree.h`, `linux/ceph/messenger.h`.
- Detected declarations: `struct ceph_client`, `struct ceph_mount_args`, `struct ceph_auth_client`, `struct ceph_monmap`, `struct ceph_mon_client`, `struct ceph_mon_generic_request`, `struct ceph_mon_request`, `struct ceph_mon_generic_request`, `struct ceph_mon_client`.
- 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.