fs/ceph/mds_client.h
Source file repositories/reference/linux-study-clean/fs/ceph/mds_client.h
File Facts
- System
- Linux kernel
- Corpus path
fs/ceph/mds_client.h- Extension
.h- Size
- 20856 bytes
- Lines
- 683
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/completion.hlinux/kref.hlinux/list.hlinux/mutex.hlinux/rbtree.hlinux/spinlock.hlinux/refcount.hlinux/utsname.hlinux/ktime.hlinux/ceph/types.hlinux/ceph/messenger.hlinux/ceph/auth.hmdsmap.hmetric.hsubvolume_metrics.hsuper.h
Detected Declarations
struct ceph_fs_clientstruct ceph_capstruct ceph_mds_cap_matchstruct ceph_mds_cap_authstruct ceph_mds_reply_info_instruct ceph_mds_reply_dir_entrystruct ceph_mds_reply_xattrstruct ceph_mds_reply_info_parsedstruct ceph_mds_sessionstruct ceph_mds_requeststruct ceph_mds_clientstruct ceph_mds_requeststruct ceph_pool_permstruct ceph_snapid_mapstruct ceph_quotarealm_inodestruct cap_waitstruct ceph_mds_clientstruct ceph_path_infoenum ceph_feature_typefunction ceph_mdsc_get_requestfunction ceph_mdsc_put_requestfunction ceph_mdsc_free_path_infofunction ceph_wait_on_async_create
Annotated Snippet
struct ceph_mds_cap_match {
s64 uid; /* default to MDS_AUTH_UID_ANY */
u32 num_gids;
u32 *gids; /* use these GIDs */
char *path; /* require path to be child of this
(may be "" or "/" for any) */
char *fs_name;
bool root_squash; /* default to false */
};
struct ceph_mds_cap_auth {
struct ceph_mds_cap_match match;
bool readable;
bool writeable;
};
/*
* parsed info about a single inode. pointers are into the encoded
* on-wire structures within the mds reply message payload.
*/
struct ceph_mds_reply_info_in {
struct ceph_mds_reply_inode *in;
struct ceph_dir_layout dir_layout;
u32 symlink_len;
char *symlink;
u32 xattr_len;
char *xattr_data;
u64 inline_version;
u32 inline_len;
char *inline_data;
u32 pool_ns_len;
char *pool_ns_data;
u64 max_bytes;
u64 max_files;
s32 dir_pin;
struct ceph_timespec btime;
struct ceph_timespec snap_btime;
u8 *fscrypt_auth;
u8 *fscrypt_file;
u32 fscrypt_auth_len;
u32 fscrypt_file_len;
u64 rsnaps;
u64 change_attr;
u64 subvolume_id;
};
struct ceph_mds_reply_dir_entry {
bool is_nokey;
char *name;
u32 name_len;
u32 raw_hash;
struct ceph_mds_reply_lease *lease;
struct ceph_mds_reply_info_in inode;
loff_t offset;
};
struct ceph_mds_reply_xattr {
char *xattr_value;
size_t xattr_value_len;
};
/*
* parsed info about an mds reply, including information about
* either: 1) the target inode and/or its parent directory and dentry,
* and directory contents (for readdir results), or
* 2) the file range lock info (for fcntl F_GETLK results).
*/
struct ceph_mds_reply_info_parsed {
struct ceph_mds_reply_head *head;
/* trace */
struct ceph_mds_reply_info_in diri, targeti;
struct ceph_mds_reply_dirfrag *dirfrag;
char *dname;
u8 *altname;
u32 dname_len;
u32 altname_len;
struct ceph_mds_reply_lease *dlease;
struct ceph_mds_reply_xattr xattr_info;
/* extra */
union {
/* for fcntl F_GETLK results */
struct ceph_filelock *filelock_reply;
/* for readdir results */
struct {
struct ceph_mds_reply_dirfrag *dir_dir;
size_t dir_buf_size;
int dir_nr;
Annotation
- Immediate include surface: `linux/completion.h`, `linux/kref.h`, `linux/list.h`, `linux/mutex.h`, `linux/rbtree.h`, `linux/spinlock.h`, `linux/refcount.h`, `linux/utsname.h`.
- Detected declarations: `struct ceph_fs_client`, `struct ceph_cap`, `struct ceph_mds_cap_match`, `struct ceph_mds_cap_auth`, `struct ceph_mds_reply_info_in`, `struct ceph_mds_reply_dir_entry`, `struct ceph_mds_reply_xattr`, `struct ceph_mds_reply_info_parsed`, `struct ceph_mds_session`, `struct ceph_mds_request`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.