Lines Matching defs:s_inode

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