#include <linux/ceph/ceph_debug.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/uaccess.h>
#include <linux/kernel.h>
#include <linux/writeback.h>
#include <linux/vmalloc.h>
#include <linux/xattr.h>
#include <linux/posix_acl.h>
#include <linux/random.h>
#include <linux/sort.h>
#include <linux/iversion.h>
#include <linux/fscrypt.h>
#include "super.h"
#include "mds_client.h"
#include "cache.h"
#include "crypto.h"
#include <linux/ceph/decode.h>
static const struct inode_operations ceph_symlink_iops;
static const struct inode_operations ceph_encrypted_symlink_iops;
static void ceph_inode_work(struct work_struct *work);
static int ceph_set_ino_cb(struct inode *inode, void *data)
{ … }
struct inode *ceph_new_inode(struct inode *dir, struct dentry *dentry,
umode_t *mode, struct ceph_acl_sec_ctx *as_ctx)
{ … }
void ceph_as_ctx_to_req(struct ceph_mds_request *req,
struct ceph_acl_sec_ctx *as_ctx)
{ … }
struct inode *ceph_get_inode(struct super_block *sb, struct ceph_vino vino,
struct inode *newino)
{ … }
struct inode *ceph_get_snapdir(struct inode *parent)
{ … }
const struct inode_operations ceph_file_iops = …;
static struct ceph_inode_frag *__get_or_create_frag(struct ceph_inode_info *ci,
u32 f)
{ … }
struct ceph_inode_frag *__ceph_find_frag(struct ceph_inode_info *ci, u32 f)
{ … }
static u32 __ceph_choose_frag(struct ceph_inode_info *ci, u32 v,
struct ceph_inode_frag *pfrag, int *found)
{ … }
u32 ceph_choose_frag(struct ceph_inode_info *ci, u32 v,
struct ceph_inode_frag *pfrag, int *found)
{ … }
static int ceph_fill_dirfrag(struct inode *inode,
struct ceph_mds_reply_dirfrag *dirinfo)
{ … }
static int frag_tree_split_cmp(const void *l, const void *r)
{ … }
static bool is_frag_child(u32 f, struct ceph_inode_frag *frag)
{ … }
static int ceph_fill_fragtree(struct inode *inode,
struct ceph_frag_tree_head *fragtree,
struct ceph_mds_reply_dirfrag *dirinfo)
{ … }
struct inode *ceph_alloc_inode(struct super_block *sb)
{ … }
void ceph_free_inode(struct inode *inode)
{ … }
void ceph_evict_inode(struct inode *inode)
{ … }
static inline blkcnt_t calc_inode_blocks(u64 size)
{ … }
int ceph_fill_file_size(struct inode *inode, int issued,
u32 truncate_seq, u64 truncate_size, u64 size)
{ … }
void ceph_fill_file_time(struct inode *inode, int issued,
u64 time_warp_seq, struct timespec64 *ctime,
struct timespec64 *mtime, struct timespec64 *atime)
{ … }
#if IS_ENABLED(CONFIG_FS_ENCRYPTION)
static int decode_encrypted_symlink(struct ceph_mds_client *mdsc,
const char *encsym,
int enclen, u8 **decsym)
{ … }
#else
static int decode_encrypted_symlink(struct ceph_mds_client *mdsc,
const char *encsym,
int symlen, u8 **decsym)
{
return -EOPNOTSUPP;
}
#endif
int ceph_fill_inode(struct inode *inode, struct page *locked_page,
struct ceph_mds_reply_info_in *iinfo,
struct ceph_mds_reply_dirfrag *dirinfo,
struct ceph_mds_session *session, int cap_fmode,
struct ceph_cap_reservation *caps_reservation)
{ … }
static void __update_dentry_lease(struct inode *dir, struct dentry *dentry,
struct ceph_mds_reply_lease *lease,
struct ceph_mds_session *session,
unsigned long from_time,
struct ceph_mds_session **old_lease_session)
{ … }
static inline void update_dentry_lease(struct inode *dir, struct dentry *dentry,
struct ceph_mds_reply_lease *lease,
struct ceph_mds_session *session,
unsigned long from_time)
{ … }
static void update_dentry_lease_careful(struct dentry *dentry,
struct ceph_mds_reply_lease *lease,
struct ceph_mds_session *session,
unsigned long from_time,
char *dname, u32 dname_len,
struct ceph_vino *pdvino,
struct ceph_vino *ptvino)
{ … }
static int splice_dentry(struct dentry **pdn, struct inode *in)
{ … }
int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req)
{ … }
static int readdir_prepopulate_inodes_only(struct ceph_mds_request *req,
struct ceph_mds_session *session)
{ … }
void ceph_readdir_cache_release(struct ceph_readdir_cache_control *ctl)
{ … }
static int fill_readdir_cache(struct inode *dir, struct dentry *dn,
struct ceph_readdir_cache_control *ctl,
struct ceph_mds_request *req)
{ … }
int ceph_readdir_prepopulate(struct ceph_mds_request *req,
struct ceph_mds_session *session)
{ … }
bool ceph_inode_set_size(struct inode *inode, loff_t size)
{ … }
void ceph_queue_inode_work(struct inode *inode, int work_bit)
{ … }
static void ceph_do_invalidate_pages(struct inode *inode)
{ … }
void __ceph_do_pending_vmtruncate(struct inode *inode)
{ … }
static void ceph_inode_work(struct work_struct *work)
{ … }
static const char *ceph_encrypted_get_link(struct dentry *dentry,
struct inode *inode,
struct delayed_call *done)
{ … }
static int ceph_encrypted_symlink_getattr(struct mnt_idmap *idmap,
const struct path *path,
struct kstat *stat, u32 request_mask,
unsigned int query_flags)
{ … }
static const struct inode_operations ceph_symlink_iops = …;
static const struct inode_operations ceph_encrypted_symlink_iops = …;
static int fill_fscrypt_truncate(struct inode *inode,
struct ceph_mds_request *req,
struct iattr *attr)
{ … }
int __ceph_setattr(struct mnt_idmap *idmap, struct inode *inode,
struct iattr *attr, struct ceph_iattr *cia)
{ … }
int ceph_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
struct iattr *attr)
{ … }
int ceph_try_to_choose_auth_mds(struct inode *inode, int mask)
{ … }
int __ceph_do_getattr(struct inode *inode, struct page *locked_page,
int mask, bool force)
{ … }
int ceph_do_getvxattr(struct inode *inode, const char *name, void *value,
size_t size)
{ … }
int ceph_permission(struct mnt_idmap *idmap, struct inode *inode,
int mask)
{ … }
static int statx_to_caps(u32 want, umode_t mode)
{ … }
int ceph_getattr(struct mnt_idmap *idmap, const struct path *path,
struct kstat *stat, u32 request_mask, unsigned int flags)
{ … }
void ceph_inode_shutdown(struct inode *inode)
{ … }