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.

Dependency Surface

Detected Declarations

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

Implementation Notes