Lines Matching refs:s_inode
3956 static int ocfs2_duplicate_inline_data(struct inode *s_inode, in ocfs2_duplicate_inline_data() argument
3963 struct ocfs2_super *osb = OCFS2_SB(s_inode->i_sb); in ocfs2_duplicate_inline_data()
3967 BUG_ON(!(OCFS2_I(s_inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL)); in ocfs2_duplicate_inline_data()
3999 static int ocfs2_duplicate_extent_list(struct inode *s_inode, in ocfs2_duplicate_extent_list() argument
4014 size = i_size_read(s_inode); in ocfs2_duplicate_extent_list()
4015 clusters = ocfs2_clusters_for_bytes(s_inode->i_sb, size); in ocfs2_duplicate_extent_list()
4019 ret = ocfs2_get_clusters(s_inode, cpos, &p_cluster, in ocfs2_duplicate_extent_list()
4051 static int ocfs2_complete_reflink(struct inode *s_inode, in ocfs2_complete_reflink() argument
4061 loff_t size = i_size_read(s_inode); in ocfs2_complete_reflink()
4079 OCFS2_I(t_inode)->ip_clusters = OCFS2_I(s_inode)->ip_clusters; in ocfs2_complete_reflink()
4080 OCFS2_I(t_inode)->ip_attr = OCFS2_I(s_inode)->ip_attr; in ocfs2_complete_reflink()
4081 OCFS2_I(t_inode)->ip_dyn_features = OCFS2_I(s_inode)->ip_dyn_features; in ocfs2_complete_reflink()
4084 t_inode->i_blocks = s_inode->i_blocks; in ocfs2_complete_reflink()
4093 t_inode->i_uid = s_inode->i_uid; in ocfs2_complete_reflink()
4094 t_inode->i_gid = s_inode->i_gid; in ocfs2_complete_reflink()
4095 t_inode->i_mode = s_inode->i_mode; in ocfs2_complete_reflink()
4110 t_inode->i_mtime = s_inode->i_mtime; in ocfs2_complete_reflink()
4122 static int ocfs2_create_reflink_node(struct inode *s_inode, in ocfs2_create_reflink_node() argument
4131 struct ocfs2_super *osb = OCFS2_SB(s_inode->i_sb); in ocfs2_create_reflink_node()
4144 if (OCFS2_I(s_inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) { in ocfs2_create_reflink_node()
4145 ret = ocfs2_duplicate_inline_data(s_inode, s_bh, in ocfs2_create_reflink_node()
4159 ret = ocfs2_duplicate_extent_list(s_inode, t_inode, t_bh, in ocfs2_create_reflink_node()
4502 static loff_t ocfs2_reflink_remap_extent(struct inode *s_inode, in ocfs2_reflink_remap_extent() argument
4523 osb = OCFS2_SB(s_inode->i_sb); in ocfs2_reflink_remap_extent()
4525 ocfs2_init_dinode_extent_tree(&s_et, INODE_CACHE(s_inode), s_bh); in ocfs2_reflink_remap_extent()
4528 spos = ocfs2_bytes_to_clusters(s_inode->i_sb, pos_in); in ocfs2_reflink_remap_extent()
4530 slast = ocfs2_clusters_for_bytes(s_inode->i_sb, pos_in + len); in ocfs2_reflink_remap_extent()
4539 ret = ocfs2_get_clusters(s_inode, spos, &p_cluster, in ocfs2_reflink_remap_extent()
4571 ret = ocfs2_add_refcount_flag(s_inode, &s_et, in ocfs2_reflink_remap_extent()
4616 loff_t ocfs2_reflink_remap_blocks(struct inode *s_inode, in ocfs2_reflink_remap_blocks() argument
4630 osb = OCFS2_SB(s_inode->i_sb); in ocfs2_reflink_remap_blocks()
4639 if (pos_in == pos_out && pos_in == 0 && len == i_size_read(s_inode) && in ocfs2_reflink_remap_blocks()
4641 (OCFS2_I(s_inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL)) { in ocfs2_reflink_remap_blocks()
4642 ret = ocfs2_duplicate_inline_data(s_inode, s_bh, t_inode, t_bh); in ocfs2_reflink_remap_blocks()
4654 if (ocfs2_is_refcount_inode(s_inode) && in ocfs2_reflink_remap_blocks()
4661 if (!ocfs2_is_refcount_inode(s_inode) && in ocfs2_reflink_remap_blocks()
4663 ret = ocfs2_create_refcount_tree(s_inode, s_bh); in ocfs2_reflink_remap_blocks()
4671 if (!ocfs2_is_refcount_inode(s_inode)) { in ocfs2_reflink_remap_blocks()
4672 ret = ocfs2_set_refcount_tree(s_inode, s_bh, in ocfs2_reflink_remap_blocks()
4698 ret = ocfs2_reflink_remap_extent(s_inode, s_bh, pos_in, t_inode, t_bh, in ocfs2_reflink_remap_blocks()
4715 int ocfs2_reflink_inodes_lock(struct inode *s_inode, in ocfs2_reflink_inodes_lock() argument
4720 struct inode *inode1 = s_inode; in ocfs2_reflink_inodes_lock()
4726 bool same_inode = (s_inode == t_inode); in ocfs2_reflink_inodes_lock()
4731 lock_two_nondirectories(s_inode, t_inode); in ocfs2_reflink_inodes_lock()
4804 unlock_two_nondirectories(s_inode, t_inode); in ocfs2_reflink_inodes_lock()
4809 void ocfs2_reflink_inodes_unlock(struct inode *s_inode, in ocfs2_reflink_inodes_unlock() argument
4814 ocfs2_inode_unlock(s_inode, 1); in ocfs2_reflink_inodes_unlock()
4815 ocfs2_rw_unlock(s_inode, 1); in ocfs2_reflink_inodes_unlock()
4817 if (s_inode != t_inode) { in ocfs2_reflink_inodes_unlock()
4822 unlock_two_nondirectories(s_inode, t_inode); in ocfs2_reflink_inodes_unlock()