include/linux/ceph/libceph.h
Source file repositories/reference/linux-study-clean/include/linux/ceph/libceph.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/ceph/libceph.h- Extension
.h- Size
- 10258 bytes
- Lines
- 326
- 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/ceph_debug.hlinux/unaligned.hlinux/backing-dev.hlinux/completion.hlinux/exportfs.hlinux/bug.hlinux/fs.hlinux/mempool.hlinux/pagemap.hlinux/wait.hlinux/writeback.hlinux/slab.hlinux/refcount.hlinux/ceph/types.hlinux/ceph/messenger.hlinux/ceph/msgpool.hlinux/ceph/mon_client.hlinux/ceph/osd_client.hlinux/ceph/ceph_fs.hlinux/ceph/string_table.h
Detected Declarations
struct ceph_optionsstruct ceph_mds_clientstruct ceph_clientstruct ceph_snap_contextstruct fs_parameterstruct fc_logfunction ceph_timeout_jiffiesfunction ceph_msgr2function calc_pages_for
Annotated Snippet
struct ceph_options {
int flags;
struct ceph_fsid fsid;
struct ceph_entity_addr my_addr;
unsigned long mount_timeout; /* jiffies */
unsigned long osd_idle_ttl; /* jiffies */
unsigned long osd_keepalive_timeout; /* jiffies */
unsigned long osd_request_timeout; /* jiffies */
u32 read_from_replica; /* CEPH_OSD_FLAG_BALANCE/LOCALIZE_READS */
int con_modes[2]; /* CEPH_CON_MODE_* */
/*
* any type that can't be simply compared or doesn't need
* to be compared should go beyond this point,
* ceph_compare_options() should be updated accordingly
*/
struct ceph_entity_addr *mon_addr; /* should be the first
pointer type of args */
int num_mon;
char *name;
struct ceph_crypto_key *key;
struct rb_root crush_locs;
};
/*
* defaults
*/
#define CEPH_MOUNT_TIMEOUT_DEFAULT msecs_to_jiffies(60 * 1000)
#define CEPH_OSD_KEEPALIVE_DEFAULT msecs_to_jiffies(5 * 1000)
#define CEPH_OSD_IDLE_TTL_DEFAULT msecs_to_jiffies(60 * 1000)
#define CEPH_OSD_REQUEST_TIMEOUT_DEFAULT 0 /* no timeout */
#define CEPH_READ_FROM_REPLICA_DEFAULT 0 /* read from primary */
#define CEPH_MONC_HUNT_INTERVAL msecs_to_jiffies(3 * 1000)
#define CEPH_MONC_PING_INTERVAL msecs_to_jiffies(10 * 1000)
#define CEPH_MONC_PING_TIMEOUT msecs_to_jiffies(30 * 1000)
#define CEPH_MONC_HUNT_BACKOFF 2
#define CEPH_MONC_HUNT_MAX_MULT 10
#define CEPH_MSG_MAX_CONTROL_LEN (16*1024*1024)
#define CEPH_MSG_MAX_FRONT_LEN (16*1024*1024)
#define CEPH_MSG_MAX_MIDDLE_LEN (16*1024*1024)
/*
* The largest possible rbd data object is 32M.
* The largest possible rbd object map object is 64M.
*
* There is no limit on the size of cephfs objects, but it has to obey
* rsize and wsize mount options anyway.
*/
#define CEPH_MSG_MAX_DATA_LEN (64*1024*1024)
#define CEPH_AUTH_NAME_DEFAULT "guest"
static inline unsigned long ceph_timeout_jiffies(unsigned long timeout)
{
return timeout ?: MAX_SCHEDULE_TIMEOUT;
}
struct ceph_mds_client;
/*
* per client state
*
* possibly shared by multiple mount points, if they are
* mounting the same ceph filesystem/cluster.
*/
struct ceph_client {
struct ceph_fsid fsid;
bool have_fsid;
void *private;
struct ceph_options *options;
struct mutex mount_mutex; /* serialize mount attempts */
wait_queue_head_t auth_wq;
int auth_err;
int (*extra_mon_dispatch)(struct ceph_client *, struct ceph_msg *);
u64 supported_features;
u64 required_features;
struct ceph_messenger msgr; /* messenger instance */
struct ceph_mon_client monc;
struct ceph_osd_client osdc;
#ifdef CONFIG_DEBUG_FS
Annotation
- Immediate include surface: `linux/ceph/ceph_debug.h`, `linux/unaligned.h`, `linux/backing-dev.h`, `linux/completion.h`, `linux/exportfs.h`, `linux/bug.h`, `linux/fs.h`, `linux/mempool.h`.
- Detected declarations: `struct ceph_options`, `struct ceph_mds_client`, `struct ceph_client`, `struct ceph_snap_context`, `struct fs_parameter`, `struct fc_log`, `function ceph_timeout_jiffies`, `function ceph_msgr2`, `function calc_pages_for`.
- 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.