#include <linux/ceph/ceph_debug.h>
#include <linux/ceph/striper.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/file.h>
#include <linux/mount.h>
#include <linux/namei.h>
#include <linux/writeback.h>
#include <linux/falloc.h>
#include <linux/iversion.h>
#include <linux/ktime.h>
#include <linux/splice.h>
#include "super.h"
#include "mds_client.h"
#include "cache.h"
#include "io.h"
#include "metric.h"
static __le32 ceph_flags_sys2wire(struct ceph_mds_client *mdsc, u32 flags)
{ … }
#define ITER_GET_BVECS_PAGES …
static ssize_t __iter_get_bvecs(struct iov_iter *iter, size_t maxsize,
struct bio_vec *bvecs)
{ … }
static ssize_t iter_get_bvecs_alloc(struct iov_iter *iter, size_t maxsize,
struct bio_vec **bvecs, int *num_bvecs)
{ … }
static void put_bvecs(struct bio_vec *bvecs, int num_bvecs, bool should_dirty)
{ … }
static struct ceph_mds_request *
prepare_open_request(struct super_block *sb, int flags, int create_mode)
{ … }
static int ceph_init_file_info(struct inode *inode, struct file *file,
int fmode, bool isdir)
{ … }
static int ceph_init_file(struct inode *inode, struct file *file, int fmode)
{ … }
int ceph_renew_caps(struct inode *inode, int fmode)
{ … }
int ceph_open(struct inode *inode, struct file *file)
{ … }
static void
cache_file_layout(struct inode *dst, struct inode *src)
{ … }
static int try_prep_async_create(struct inode *dir, struct dentry *dentry,
struct ceph_file_layout *lo, u64 *pino)
{ … }
static void restore_deleg_ino(struct inode *dir, u64 ino)
{ … }
static void wake_async_create_waiters(struct inode *inode,
struct ceph_mds_session *session)
{ … }
static void ceph_async_create_cb(struct ceph_mds_client *mdsc,
struct ceph_mds_request *req)
{ … }
static int ceph_finish_async_create(struct inode *dir, struct inode *inode,
struct dentry *dentry,
struct file *file, umode_t mode,
struct ceph_mds_request *req,
struct ceph_acl_sec_ctx *as_ctx,
struct ceph_file_layout *lo)
{ … }
int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
struct file *file, unsigned flags, umode_t mode)
{ … }
int ceph_release(struct inode *inode, struct file *file)
{ … }
enum { … };
ssize_t __ceph_sync_read(struct inode *inode, loff_t *ki_pos,
struct iov_iter *to, int *retry_op,
u64 *last_objver)
{ … }
static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *to,
int *retry_op)
{ … }
struct ceph_aio_request { … };
struct ceph_aio_work { … };
static void ceph_aio_retry_work(struct work_struct *work);
static void ceph_aio_complete(struct inode *inode,
struct ceph_aio_request *aio_req)
{ … }
static void ceph_aio_complete_req(struct ceph_osd_request *req)
{ … }
static void ceph_aio_retry_work(struct work_struct *work)
{ … }
static ssize_t
ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter,
struct ceph_snap_context *snapc,
struct ceph_cap_flush **pcf)
{ … }
static ssize_t
ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos,
struct ceph_snap_context *snapc)
{ … }
static ssize_t ceph_read_iter(struct kiocb *iocb, struct iov_iter *to)
{ … }
static ssize_t ceph_splice_read(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe,
size_t len, unsigned int flags)
{ … }
static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from)
{ … }
static loff_t ceph_llseek(struct file *file, loff_t offset, int whence)
{ … }
static inline void ceph_zero_partial_page(
struct inode *inode, loff_t offset, unsigned size)
{ … }
static void ceph_zero_pagecache_range(struct inode *inode, loff_t offset,
loff_t length)
{ … }
static int ceph_zero_partial_object(struct inode *inode,
loff_t offset, loff_t *length)
{ … }
static int ceph_zero_objects(struct inode *inode, loff_t offset, loff_t length)
{ … }
static long ceph_fallocate(struct file *file, int mode,
loff_t offset, loff_t length)
{ … }
static int get_rd_wr_caps(struct file *src_filp, int *src_got,
struct file *dst_filp,
loff_t dst_endoff, int *dst_got)
{ … }
static void put_rd_wr_caps(struct ceph_inode_info *src_ci, int src_got,
struct ceph_inode_info *dst_ci, int dst_got)
{ … }
static int is_file_size_ok(struct inode *src_inode, struct inode *dst_inode,
loff_t src_off, loff_t dst_off, size_t len)
{ … }
static struct ceph_osd_request *
ceph_alloc_copyfrom_request(struct ceph_osd_client *osdc,
u64 src_snapid,
struct ceph_object_id *src_oid,
struct ceph_object_locator *src_oloc,
struct ceph_object_id *dst_oid,
struct ceph_object_locator *dst_oloc,
u32 truncate_seq, u64 truncate_size)
{ … }
static ssize_t ceph_do_objects_copy(struct ceph_inode_info *src_ci, u64 *src_off,
struct ceph_inode_info *dst_ci, u64 *dst_off,
struct ceph_fs_client *fsc,
size_t len, unsigned int flags)
{ … }
static ssize_t __ceph_copy_file_range(struct file *src_file, loff_t src_off,
struct file *dst_file, loff_t dst_off,
size_t len, unsigned int flags)
{ … }
static ssize_t ceph_copy_file_range(struct file *src_file, loff_t src_off,
struct file *dst_file, loff_t dst_off,
size_t len, unsigned int flags)
{ … }
const struct file_operations ceph_file_fops = …;