#include <linux/capability.h>
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/highmem.h>
#include <linux/pagemap.h>
#include <linux/uio.h>
#include <linux/sched.h>
#include <linux/splice.h>
#include <linux/mount.h>
#include <linux/writeback.h>
#include <linux/falloc.h>
#include <linux/quotaops.h>
#include <linux/blkdev.h>
#include <linux/backing-dev.h>
#include <cluster/masklog.h>
#include "ocfs2.h"
#include "alloc.h"
#include "aops.h"
#include "dir.h"
#include "dlmglue.h"
#include "extent_map.h"
#include "file.h"
#include "sysfile.h"
#include "inode.h"
#include "ioctl.h"
#include "journal.h"
#include "locks.h"
#include "mmap.h"
#include "suballoc.h"
#include "super.h"
#include "xattr.h"
#include "acl.h"
#include "quota.h"
#include "refcounttree.h"
#include "ocfs2_trace.h"
#include "buffer_head_io.h"
static int ocfs2_init_file_private(struct inode *inode, struct file *file)
{ … }
static void ocfs2_free_file_private(struct inode *inode, struct file *file)
{ … }
static int ocfs2_file_open(struct inode *inode, struct file *file)
{ … }
static int ocfs2_file_release(struct inode *inode, struct file *file)
{ … }
static int ocfs2_dir_open(struct inode *inode, struct file *file)
{ … }
static int ocfs2_dir_release(struct inode *inode, struct file *file)
{ … }
static int ocfs2_sync_file(struct file *file, loff_t start, loff_t end,
int datasync)
{ … }
int ocfs2_should_update_atime(struct inode *inode,
struct vfsmount *vfsmnt)
{ … }
int ocfs2_update_inode_atime(struct inode *inode,
struct buffer_head *bh)
{ … }
int ocfs2_set_inode_size(handle_t *handle,
struct inode *inode,
struct buffer_head *fe_bh,
u64 new_i_size)
{ … }
int ocfs2_simple_size_update(struct inode *inode,
struct buffer_head *di_bh,
u64 new_i_size)
{ … }
static int ocfs2_cow_file_pos(struct inode *inode,
struct buffer_head *fe_bh,
u64 offset)
{ … }
static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb,
struct inode *inode,
struct buffer_head *fe_bh,
u64 new_i_size)
{ … }
int ocfs2_truncate_file(struct inode *inode,
struct buffer_head *di_bh,
u64 new_i_size)
{ … }
int ocfs2_add_inode_data(struct ocfs2_super *osb,
struct inode *inode,
u32 *logical_offset,
u32 clusters_to_add,
int mark_unwritten,
struct buffer_head *fe_bh,
handle_t *handle,
struct ocfs2_alloc_context *data_ac,
struct ocfs2_alloc_context *meta_ac,
enum ocfs2_alloc_restarted *reason_ret)
{ … }
static int ocfs2_extend_allocation(struct inode *inode, u32 logical_start,
u32 clusters_to_add, int mark_unwritten)
{ … }
static handle_t *ocfs2_zero_start_ordered_transaction(struct inode *inode,
struct buffer_head *di_bh,
loff_t start_byte,
loff_t length)
{ … }
static int ocfs2_write_zero_page(struct inode *inode, u64 abs_from,
u64 abs_to, struct buffer_head *di_bh)
{ … }
static int ocfs2_zero_extend_get_range(struct inode *inode,
struct buffer_head *di_bh,
u64 zero_start, u64 zero_end,
u64 *range_start, u64 *range_end)
{ … }
static int ocfs2_zero_extend_range(struct inode *inode, u64 range_start,
u64 range_end, struct buffer_head *di_bh)
{ … }
int ocfs2_zero_extend(struct inode *inode, struct buffer_head *di_bh,
loff_t zero_to_size)
{ … }
int ocfs2_extend_no_holes(struct inode *inode, struct buffer_head *di_bh,
u64 new_i_size, u64 zero_to)
{ … }
static int ocfs2_extend_file(struct inode *inode,
struct buffer_head *di_bh,
u64 new_i_size)
{ … }
int ocfs2_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
struct iattr *attr)
{ … }
int ocfs2_getattr(struct mnt_idmap *idmap, const struct path *path,
struct kstat *stat, u32 request_mask, unsigned int flags)
{ … }
int ocfs2_permission(struct mnt_idmap *idmap, struct inode *inode,
int mask)
{ … }
static int __ocfs2_write_remove_suid(struct inode *inode,
struct buffer_head *bh)
{ … }
static int ocfs2_write_remove_suid(struct inode *inode)
{ … }
static int ocfs2_allocate_unwritten_extents(struct inode *inode,
u64 start, u64 len)
{ … }
static void ocfs2_truncate_cluster_pages(struct inode *inode, u64 byte_start,
u64 byte_len)
{ … }
static int ocfs2_zeroout_partial_cluster(struct inode *inode,
u64 start, u64 len)
{ … }
static int ocfs2_zero_partial_clusters(struct inode *inode,
u64 start, u64 len)
{ … }
static int ocfs2_find_rec(struct ocfs2_extent_list *el, u32 pos)
{ … }
static void ocfs2_calc_trunc_pos(struct inode *inode,
struct ocfs2_extent_list *el,
struct ocfs2_extent_rec *rec,
u32 trunc_start, u32 *trunc_cpos,
u32 *trunc_len, u32 *trunc_end,
u64 *blkno, int *done)
{ … }
int ocfs2_remove_inode_range(struct inode *inode,
struct buffer_head *di_bh, u64 byte_start,
u64 byte_len)
{ … }
static int __ocfs2_change_file_space(struct file *file, struct inode *inode,
loff_t f_pos, unsigned int cmd,
struct ocfs2_space_resv *sr,
int change_size)
{ … }
int ocfs2_change_file_space(struct file *file, unsigned int cmd,
struct ocfs2_space_resv *sr)
{ … }
static long ocfs2_fallocate(struct file *file, int mode, loff_t offset,
loff_t len)
{ … }
int ocfs2_check_range_for_refcount(struct inode *inode, loff_t pos,
size_t count)
{ … }
static int ocfs2_is_io_unaligned(struct inode *inode, size_t count, loff_t pos)
{ … }
static int ocfs2_inode_lock_for_extent_tree(struct inode *inode,
struct buffer_head **di_bh,
int meta_level,
int write_sem,
int wait)
{ … }
static void ocfs2_inode_unlock_for_extent_tree(struct inode *inode,
struct buffer_head **di_bh,
int meta_level,
int write_sem)
{ … }
static int ocfs2_prepare_inode_for_write(struct file *file,
loff_t pos, size_t count, int wait)
{ … }
static ssize_t ocfs2_file_write_iter(struct kiocb *iocb,
struct iov_iter *from)
{ … }
static ssize_t ocfs2_file_read_iter(struct kiocb *iocb,
struct iov_iter *to)
{ … }
static ssize_t ocfs2_file_splice_read(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe,
size_t len, unsigned int flags)
{ … }
static loff_t ocfs2_file_llseek(struct file *file, loff_t offset, int whence)
{ … }
static loff_t ocfs2_remap_file_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 loff_t ocfs2_dir_llseek(struct file *file, loff_t offset, int whence)
{ … }
const struct inode_operations ocfs2_file_iops = …;
const struct inode_operations ocfs2_special_file_iops = …;
const struct file_operations ocfs2_fops = …;
WRAP_DIR_ITER(…)
const struct file_operations ocfs2_dops = …;
const struct file_operations ocfs2_fops_no_plocks = …;
const struct file_operations ocfs2_dops_no_plocks = …;