#include <linux/ceph/ceph_debug.h>
#include <linux/backing-dev.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/pagemap.h>
#include <linux/slab.h>
#include <linux/pagevec.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/signal.h>
#include <linux/iversion.h>
#include <linux/ktime.h>
#include <linux/netfs.h>
#include "super.h"
#include "mds_client.h"
#include "cache.h"
#include "metric.h"
#include "crypto.h"
#include <linux/ceph/osd_client.h>
#include <linux/ceph/striper.h>
#define CONGESTION_ON_THRESH(congestion_kb) …
#define CONGESTION_OFF_THRESH(congestion_kb) …
static int ceph_netfs_check_write_begin(struct file *file, loff_t pos, unsigned int len,
struct folio **foliop, void **_fsdata);
static inline struct ceph_snap_context *page_snap_context(struct page *page)
{ … }
static bool ceph_dirty_folio(struct address_space *mapping, struct folio *folio)
{ … }
static void ceph_invalidate_folio(struct folio *folio, size_t offset,
size_t length)
{ … }
static void ceph_netfs_expand_readahead(struct netfs_io_request *rreq)
{ … }
static bool ceph_netfs_clamp_length(struct netfs_io_subrequest *subreq)
{ … }
static void finish_netfs_read(struct ceph_osd_request *req)
{ … }
static bool ceph_netfs_issue_op_inline(struct netfs_io_subrequest *subreq)
{ … }
static void ceph_netfs_issue_read(struct netfs_io_subrequest *subreq)
{ … }
static int ceph_init_request(struct netfs_io_request *rreq, struct file *file)
{ … }
static void ceph_netfs_free_request(struct netfs_io_request *rreq)
{ … }
const struct netfs_request_ops ceph_netfs_ops = …;
#ifdef CONFIG_CEPH_FSCACHE
static void ceph_fscache_write_terminated(void *priv, ssize_t error, bool was_async)
{ … }
static void ceph_fscache_write_to_cache(struct inode *inode, u64 off, u64 len, bool caching)
{ … }
#else
static inline void ceph_fscache_write_to_cache(struct inode *inode, u64 off, u64 len, bool caching)
{
}
#endif
struct ceph_writeback_ctl
{ … };
static struct ceph_snap_context *
get_oldest_context(struct inode *inode, struct ceph_writeback_ctl *ctl,
struct ceph_snap_context *page_snapc)
{ … }
static u64 get_writepages_data_length(struct inode *inode,
struct page *page, u64 start)
{ … }
static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
{ … }
static int ceph_writepage(struct page *page, struct writeback_control *wbc)
{ … }
static void writepages_finish(struct ceph_osd_request *req)
{ … }
static int ceph_writepages_start(struct address_space *mapping,
struct writeback_control *wbc)
{ … }
static int context_is_writeable_or_written(struct inode *inode,
struct ceph_snap_context *snapc)
{ … }
static struct ceph_snap_context *
ceph_find_incompatible(struct page *page)
{ … }
static int ceph_netfs_check_write_begin(struct file *file, loff_t pos, unsigned int len,
struct folio **foliop, void **_fsdata)
{ … }
static int ceph_write_begin(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len,
struct page **pagep, void **fsdata)
{ … }
static int ceph_write_end(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct page *subpage, void *fsdata)
{ … }
const struct address_space_operations ceph_aops = …;
static void ceph_block_sigs(sigset_t *oldset)
{ … }
static void ceph_restore_sigs(sigset_t *oldset)
{ … }
static vm_fault_t ceph_filemap_fault(struct vm_fault *vmf)
{ … }
static vm_fault_t ceph_page_mkwrite(struct vm_fault *vmf)
{ … }
void ceph_fill_inline_data(struct inode *inode, struct page *locked_page,
char *data, size_t len)
{ … }
int ceph_uninline_data(struct file *file)
{ … }
static const struct vm_operations_struct ceph_vmops = …;
int ceph_mmap(struct file *file, struct vm_area_struct *vma)
{ … }
enum { … };
static int __ceph_pool_perm_get(struct ceph_inode_info *ci,
s64 pool, struct ceph_string *pool_ns)
{ … }
int ceph_pool_perm_check(struct inode *inode, int need)
{ … }
void ceph_pool_perm_destroy(struct ceph_mds_client *mdsc)
{ … }