#include <linux/ceph/ceph_debug.h>
#include <linux/spinlock.h>
#include <linux/namei.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/xattr.h>
#include "super.h"
#include "mds_client.h"
#include "crypto.h"
const struct dentry_operations ceph_dentry_ops;
static bool __dentry_lease_is_valid(struct ceph_dentry_info *di);
static int __dir_lease_try_check(const struct dentry *dentry);
static int ceph_d_init(struct dentry *dentry)
{ … }
#define OFFSET_BITS …
#define OFFSET_MASK …
#define HASH_ORDER …
loff_t ceph_make_fpos(unsigned high, unsigned off, bool hash_order)
{ … }
static bool is_hash_order(loff_t p)
{ … }
static unsigned fpos_frag(loff_t p)
{ … }
static unsigned fpos_hash(loff_t p)
{ … }
static unsigned fpos_off(loff_t p)
{ … }
static int fpos_cmp(loff_t l, loff_t r)
{ … }
static int note_last_dentry(struct ceph_fs_client *fsc,
struct ceph_dir_file_info *dfi,
const char *name,
int len, unsigned next_offset)
{ … }
static struct dentry *
__dcache_find_get_entry(struct dentry *parent, u64 idx,
struct ceph_readdir_cache_control *cache_ctl)
{ … }
static int __dcache_readdir(struct file *file, struct dir_context *ctx,
int shared_gen)
{ … }
static bool need_send_readdir(struct ceph_dir_file_info *dfi, loff_t pos)
{ … }
static int ceph_readdir(struct file *file, struct dir_context *ctx)
{ … }
static void reset_readdir(struct ceph_dir_file_info *dfi)
{ … }
static bool need_reset_readdir(struct ceph_dir_file_info *dfi, loff_t new_pos)
{ … }
static loff_t ceph_dir_llseek(struct file *file, loff_t offset, int whence)
{ … }
struct dentry *ceph_handle_snapdir(struct ceph_mds_request *req,
struct dentry *dentry)
{ … }
struct dentry *ceph_finish_lookup(struct ceph_mds_request *req,
struct dentry *dentry, int err)
{ … }
static bool is_root_ceph_dentry(struct inode *inode, struct dentry *dentry)
{ … }
static struct dentry *ceph_lookup(struct inode *dir, struct dentry *dentry,
unsigned int flags)
{ … }
int ceph_handle_notrace_create(struct inode *dir, struct dentry *dentry)
{ … }
static int ceph_mknod(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode, dev_t rdev)
{ … }
static int ceph_create(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode, bool excl)
{ … }
#if IS_ENABLED(CONFIG_FS_ENCRYPTION)
static int prep_encrypted_symlink_target(struct ceph_mds_request *req,
const char *dest)
{ … }
#else
static int prep_encrypted_symlink_target(struct ceph_mds_request *req,
const char *dest)
{
return -EOPNOTSUPP;
}
#endif
static int ceph_symlink(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, const char *dest)
{ … }
static int ceph_mkdir(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode)
{ … }
static int ceph_link(struct dentry *old_dentry, struct inode *dir,
struct dentry *dentry)
{ … }
static void ceph_async_unlink_cb(struct ceph_mds_client *mdsc,
struct ceph_mds_request *req)
{ … }
static int get_caps_for_async_unlink(struct inode *dir, struct dentry *dentry)
{ … }
static int ceph_unlink(struct inode *dir, struct dentry *dentry)
{ … }
static int ceph_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{ … }
void __ceph_dentry_lease_touch(struct ceph_dentry_info *di)
{ … }
static void __dentry_dir_lease_touch(struct ceph_mds_client* mdsc,
struct ceph_dentry_info *di)
{ … }
void __ceph_dentry_dir_lease_touch(struct ceph_dentry_info *di)
{ … }
static void __dentry_lease_unlist(struct ceph_dentry_info *di)
{ … }
enum { … };
struct ceph_lease_walk_control { … };
static int __dir_lease_check(const struct dentry *, struct ceph_lease_walk_control *);
static int __dentry_lease_check(const struct dentry *);
static unsigned long
__dentry_leases_walk(struct ceph_mds_client *mdsc,
struct ceph_lease_walk_control *lwc)
{ … }
static int __dentry_lease_check(const struct dentry *dentry)
{ … }
static int __dir_lease_check(const struct dentry *dentry,
struct ceph_lease_walk_control *lwc)
{ … }
int ceph_trim_dentries(struct ceph_mds_client *mdsc)
{ … }
void ceph_invalidate_dentry_lease(struct dentry *dentry)
{ … }
static bool __dentry_lease_is_valid(struct ceph_dentry_info *di)
{ … }
static int dentry_lease_is_valid(struct dentry *dentry, unsigned int flags)
{ … }
static int __dir_lease_try_check(const struct dentry *dentry)
{ … }
static int dir_lease_is_valid(struct inode *dir, struct dentry *dentry,
struct ceph_mds_client *mdsc)
{ … }
static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags)
{ … }
static int ceph_d_delete(const struct dentry *dentry)
{ … }
static void ceph_d_release(struct dentry *dentry)
{ … }
static void ceph_d_prune(struct dentry *dentry)
{ … }
static ssize_t ceph_read_dir(struct file *file, char __user *buf, size_t size,
loff_t *ppos)
{ … }
unsigned ceph_dentry_hash(struct inode *dir, struct dentry *dn)
{ … }
WRAP_DIR_ITER(…)
const struct file_operations ceph_dir_fops = …;
const struct file_operations ceph_snapdir_fops = …;
const struct inode_operations ceph_dir_iops = …;
const struct inode_operations ceph_snapdir_iops = …;
const struct dentry_operations ceph_dentry_ops = …;