#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
#include "xfs_inode.h"
#include "xfs_trans.h"
#include "xfs_inode_item.h"
#include "xfs_bmap.h"
#include "xfs_bmap_util.h"
#include "xfs_dir2.h"
#include "xfs_dir2_priv.h"
#include "xfs_ioctl.h"
#include "xfs_trace.h"
#include "xfs_log.h"
#include "xfs_icache.h"
#include "xfs_pnfs.h"
#include "xfs_iomap.h"
#include "xfs_reflink.h"
#include "xfs_file.h"
#include <linux/dax.h>
#include <linux/falloc.h>
#include <linux/backing-dev.h>
#include <linux/mman.h>
#include <linux/fadvise.h>
#include <linux/mount.h>
static const struct vm_operations_struct xfs_file_vm_ops;
bool
xfs_is_falloc_aligned(
struct xfs_inode *ip,
loff_t pos,
long long int len)
{ … }
STATIC int
xfs_dir_fsync(
struct file *file,
loff_t start,
loff_t end,
int datasync)
{ … }
static xfs_csn_t
xfs_fsync_seq(
struct xfs_inode *ip,
bool datasync)
{ … }
static int
xfs_fsync_flush_log(
struct xfs_inode *ip,
bool datasync,
int *log_flushed)
{ … }
STATIC int
xfs_file_fsync(
struct file *file,
loff_t start,
loff_t end,
int datasync)
{ … }
static int
xfs_ilock_iocb(
struct kiocb *iocb,
unsigned int lock_mode)
{ … }
static int
xfs_ilock_iocb_for_write(
struct kiocb *iocb,
unsigned int *lock_mode)
{ … }
STATIC ssize_t
xfs_file_dio_read(
struct kiocb *iocb,
struct iov_iter *to)
{ … }
static noinline ssize_t
xfs_file_dax_read(
struct kiocb *iocb,
struct iov_iter *to)
{ … }
STATIC ssize_t
xfs_file_buffered_read(
struct kiocb *iocb,
struct iov_iter *to)
{ … }
STATIC ssize_t
xfs_file_read_iter(
struct kiocb *iocb,
struct iov_iter *to)
{ … }
STATIC ssize_t
xfs_file_splice_read(
struct file *in,
loff_t *ppos,
struct pipe_inode_info *pipe,
size_t len,
unsigned int flags)
{ … }
STATIC ssize_t
xfs_file_write_checks(
struct kiocb *iocb,
struct iov_iter *from,
unsigned int *iolock)
{ … }
static int
xfs_dio_write_end_io(
struct kiocb *iocb,
ssize_t size,
int error,
unsigned flags)
{ … }
static const struct iomap_dio_ops xfs_dio_write_ops = …;
static noinline ssize_t
xfs_file_dio_write_aligned(
struct xfs_inode *ip,
struct kiocb *iocb,
struct iov_iter *from)
{ … }
static noinline ssize_t
xfs_file_dio_write_unaligned(
struct xfs_inode *ip,
struct kiocb *iocb,
struct iov_iter *from)
{ … }
static ssize_t
xfs_file_dio_write(
struct kiocb *iocb,
struct iov_iter *from)
{ … }
static noinline ssize_t
xfs_file_dax_write(
struct kiocb *iocb,
struct iov_iter *from)
{ … }
STATIC ssize_t
xfs_file_buffered_write(
struct kiocb *iocb,
struct iov_iter *from)
{ … }
STATIC ssize_t
xfs_file_write_iter(
struct kiocb *iocb,
struct iov_iter *from)
{ … }
static inline bool xfs_file_sync_writes(struct file *filp)
{ … }
#define XFS_FALLOC_FL_SUPPORTED …
STATIC long
xfs_file_fallocate(
struct file *file,
int mode,
loff_t offset,
loff_t len)
{ … }
STATIC int
xfs_file_fadvise(
struct file *file,
loff_t start,
loff_t end,
int advice)
{ … }
STATIC loff_t
xfs_file_remap_range(
struct file *file_in,
loff_t pos_in,
struct file *file_out,
loff_t pos_out,
loff_t len,
unsigned int remap_flags)
{ … }
STATIC int
xfs_file_open(
struct inode *inode,
struct file *file)
{ … }
STATIC int
xfs_dir_open(
struct inode *inode,
struct file *file)
{ … }
STATIC int
xfs_file_release(
struct inode *inode,
struct file *filp)
{ … }
STATIC int
xfs_file_readdir(
struct file *file,
struct dir_context *ctx)
{ … }
STATIC loff_t
xfs_file_llseek(
struct file *file,
loff_t offset,
int whence)
{ … }
static inline vm_fault_t
xfs_dax_fault_locked(
struct vm_fault *vmf,
unsigned int order,
bool write_fault)
{ … }
static vm_fault_t
xfs_dax_read_fault(
struct vm_fault *vmf,
unsigned int order)
{ … }
static vm_fault_t
xfs_write_fault(
struct vm_fault *vmf,
unsigned int order)
{ … }
static vm_fault_t
__xfs_filemap_fault(
struct vm_fault *vmf,
unsigned int order,
bool write_fault)
{ … }
static inline bool
xfs_is_write_fault(
struct vm_fault *vmf)
{ … }
static vm_fault_t
xfs_filemap_fault(
struct vm_fault *vmf)
{ … }
static vm_fault_t
xfs_filemap_huge_fault(
struct vm_fault *vmf,
unsigned int order)
{ … }
static vm_fault_t
xfs_filemap_page_mkwrite(
struct vm_fault *vmf)
{ … }
static vm_fault_t
xfs_filemap_pfn_mkwrite(
struct vm_fault *vmf)
{ … }
static const struct vm_operations_struct xfs_file_vm_ops = …;
STATIC int
xfs_file_mmap(
struct file *file,
struct vm_area_struct *vma)
{ … }
const struct file_operations xfs_file_operations = …;
const struct file_operations xfs_dir_file_operations = …;