Lines Matching refs:s_inode
3926 static int ocfs2_duplicate_inline_data(struct inode *s_inode, in ocfs2_duplicate_inline_data() argument
3933 struct ocfs2_super *osb = OCFS2_SB(s_inode->i_sb); in ocfs2_duplicate_inline_data()
3937 BUG_ON(!(OCFS2_I(s_inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL)); in ocfs2_duplicate_inline_data()
3969 static int ocfs2_duplicate_extent_list(struct inode *s_inode, in ocfs2_duplicate_extent_list() argument
3984 size = i_size_read(s_inode); in ocfs2_duplicate_extent_list()
3985 clusters = ocfs2_clusters_for_bytes(s_inode->i_sb, size); in ocfs2_duplicate_extent_list()
3989 ret = ocfs2_get_clusters(s_inode, cpos, &p_cluster, in ocfs2_duplicate_extent_list()
4021 static int ocfs2_complete_reflink(struct inode *s_inode, in ocfs2_complete_reflink() argument
4031 loff_t size = i_size_read(s_inode); in ocfs2_complete_reflink()
4049 OCFS2_I(t_inode)->ip_clusters = OCFS2_I(s_inode)->ip_clusters; in ocfs2_complete_reflink()
4050 OCFS2_I(t_inode)->ip_attr = OCFS2_I(s_inode)->ip_attr; in ocfs2_complete_reflink()
4051 OCFS2_I(t_inode)->ip_dyn_features = OCFS2_I(s_inode)->ip_dyn_features; in ocfs2_complete_reflink()
4054 t_inode->i_blocks = s_inode->i_blocks; in ocfs2_complete_reflink()
4063 t_inode->i_uid = s_inode->i_uid; in ocfs2_complete_reflink()
4064 t_inode->i_gid = s_inode->i_gid; in ocfs2_complete_reflink()
4065 t_inode->i_mode = s_inode->i_mode; in ocfs2_complete_reflink()
4080 t_inode->i_mtime = s_inode->i_mtime; in ocfs2_complete_reflink()
4092 static int ocfs2_create_reflink_node(struct inode *s_inode, in ocfs2_create_reflink_node() argument
4101 struct ocfs2_super *osb = OCFS2_SB(s_inode->i_sb); in ocfs2_create_reflink_node()
4114 if (OCFS2_I(s_inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) { in ocfs2_create_reflink_node()
4115 ret = ocfs2_duplicate_inline_data(s_inode, s_bh, in ocfs2_create_reflink_node()
4129 ret = ocfs2_duplicate_extent_list(s_inode, t_inode, t_bh, in ocfs2_create_reflink_node()
4472 static loff_t ocfs2_reflink_remap_extent(struct inode *s_inode, in ocfs2_reflink_remap_extent() argument
4493 osb = OCFS2_SB(s_inode->i_sb); in ocfs2_reflink_remap_extent()
4495 ocfs2_init_dinode_extent_tree(&s_et, INODE_CACHE(s_inode), s_bh); in ocfs2_reflink_remap_extent()
4498 spos = ocfs2_bytes_to_clusters(s_inode->i_sb, pos_in); in ocfs2_reflink_remap_extent()
4500 slast = ocfs2_clusters_for_bytes(s_inode->i_sb, pos_in + len); in ocfs2_reflink_remap_extent()
4509 ret = ocfs2_get_clusters(s_inode, spos, &p_cluster, in ocfs2_reflink_remap_extent()
4541 ret = ocfs2_add_refcount_flag(s_inode, &s_et, in ocfs2_reflink_remap_extent()
4586 loff_t ocfs2_reflink_remap_blocks(struct inode *s_inode, in ocfs2_reflink_remap_blocks() argument
4600 osb = OCFS2_SB(s_inode->i_sb); in ocfs2_reflink_remap_blocks()
4609 if (pos_in == pos_out && pos_in == 0 && len == i_size_read(s_inode) && in ocfs2_reflink_remap_blocks()
4611 (OCFS2_I(s_inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL)) { in ocfs2_reflink_remap_blocks()
4612 ret = ocfs2_duplicate_inline_data(s_inode, s_bh, t_inode, t_bh); in ocfs2_reflink_remap_blocks()
4624 if (ocfs2_is_refcount_inode(s_inode) && in ocfs2_reflink_remap_blocks()
4631 if (!ocfs2_is_refcount_inode(s_inode) && in ocfs2_reflink_remap_blocks()
4633 ret = ocfs2_create_refcount_tree(s_inode, s_bh); in ocfs2_reflink_remap_blocks()
4641 if (!ocfs2_is_refcount_inode(s_inode)) { in ocfs2_reflink_remap_blocks()
4642 ret = ocfs2_set_refcount_tree(s_inode, s_bh, in ocfs2_reflink_remap_blocks()
4668 ret = ocfs2_reflink_remap_extent(s_inode, s_bh, pos_in, t_inode, t_bh, in ocfs2_reflink_remap_blocks()
4685 int ocfs2_reflink_inodes_lock(struct inode *s_inode, in ocfs2_reflink_inodes_lock() argument
4690 struct inode *inode1 = s_inode; in ocfs2_reflink_inodes_lock()
4696 bool same_inode = (s_inode == t_inode); in ocfs2_reflink_inodes_lock()
4701 lock_two_nondirectories(s_inode, t_inode); in ocfs2_reflink_inodes_lock()
4774 unlock_two_nondirectories(s_inode, t_inode); in ocfs2_reflink_inodes_lock()
4779 void ocfs2_reflink_inodes_unlock(struct inode *s_inode, in ocfs2_reflink_inodes_unlock() argument
4784 ocfs2_inode_unlock(s_inode, 1); in ocfs2_reflink_inodes_unlock()
4785 ocfs2_rw_unlock(s_inode, 1); in ocfs2_reflink_inodes_unlock()
4787 if (s_inode != t_inode) { in ocfs2_reflink_inodes_unlock()
4792 unlock_two_nondirectories(s_inode, t_inode); in ocfs2_reflink_inodes_unlock()