0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef OCFS2_FILE_H
0011 #define OCFS2_FILE_H
0012
0013 extern const struct file_operations ocfs2_fops;
0014 extern const struct file_operations ocfs2_dops;
0015 extern const struct file_operations ocfs2_fops_no_plocks;
0016 extern const struct file_operations ocfs2_dops_no_plocks;
0017 extern const struct inode_operations ocfs2_file_iops;
0018 extern const struct inode_operations ocfs2_special_file_iops;
0019 struct ocfs2_alloc_context;
0020 enum ocfs2_alloc_restarted;
0021
0022 struct ocfs2_file_private {
0023 struct file *fp_file;
0024 struct mutex fp_mutex;
0025 struct ocfs2_lock_res fp_flock;
0026 };
0027
0028 int ocfs2_add_inode_data(struct ocfs2_super *osb,
0029 struct inode *inode,
0030 u32 *logical_offset,
0031 u32 clusters_to_add,
0032 int mark_unwritten,
0033 struct buffer_head *fe_bh,
0034 handle_t *handle,
0035 struct ocfs2_alloc_context *data_ac,
0036 struct ocfs2_alloc_context *meta_ac,
0037 enum ocfs2_alloc_restarted *reason_ret);
0038 int ocfs2_set_inode_size(handle_t *handle,
0039 struct inode *inode,
0040 struct buffer_head *fe_bh,
0041 u64 new_i_size);
0042 int ocfs2_simple_size_update(struct inode *inode,
0043 struct buffer_head *di_bh,
0044 u64 new_i_size);
0045 int ocfs2_truncate_file(struct inode *inode,
0046 struct buffer_head *di_bh,
0047 u64 new_i_size);
0048 int ocfs2_extend_no_holes(struct inode *inode, struct buffer_head *di_bh,
0049 u64 new_i_size, u64 zero_to);
0050 int ocfs2_zero_extend(struct inode *inode, struct buffer_head *di_bh,
0051 loff_t zero_to);
0052 int ocfs2_setattr(struct user_namespace *mnt_userns, struct dentry *dentry,
0053 struct iattr *attr);
0054 int ocfs2_getattr(struct user_namespace *mnt_userns, const struct path *path,
0055 struct kstat *stat, u32 request_mask, unsigned int flags);
0056 int ocfs2_permission(struct user_namespace *mnt_userns,
0057 struct inode *inode,
0058 int mask);
0059
0060 int ocfs2_should_update_atime(struct inode *inode,
0061 struct vfsmount *vfsmnt);
0062 int ocfs2_update_inode_atime(struct inode *inode,
0063 struct buffer_head *bh);
0064
0065 int ocfs2_change_file_space(struct file *file, unsigned int cmd,
0066 struct ocfs2_space_resv *sr);
0067
0068 int ocfs2_check_range_for_refcount(struct inode *inode, loff_t pos,
0069 size_t count);
0070 int ocfs2_remove_inode_range(struct inode *inode,
0071 struct buffer_head *di_bh, u64 byte_start,
0072 u64 byte_len);
0073 #endif