ocfs2: Update VFS inode's id info after reflink.
PATCH 1/1 ocfs2: Update VFS inode's id info after reflink.
In reflink we update the id info in the disk but forget to update the corresponding information in the VFS inode. So update them accordingly in case we want to preserve the attributes.
--- fs/ocfs2/refcounttree.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
fs/ocfs2/refcounttree.c +3 -0
@@ -4083,6 +4083,9 @@ static int ocfs2_complete_reflink(struct inode *s_inode, di->i_attr = s_di->i_attr;if (preserve) { + t_inode->i_uid = s_inode->i_uid; + t_inode->i_gid = s_inode->i_gid; + t_inode->i_mode = s_inode->i_mode; di->i_uid = s_di->i_uid; di->i_gid = s_di->i_gid; di->i_mode = s_di->i_mode;
Signature · 1 line
1.6.3.3.334.g916e1.dirty
PATCH 1/1 ocfs2: Update VFS inode's id info after reflink.
Quoted 15 lines · Tao Ma
In reflink we update the id info in the disk but forget to update the corresponding information in the VFS inode. So update them accordingly in case we want to preserve the attributes.
Reported-by Jeff Liu <[email protected]>Signed-off-by Tao Ma <[email protected]>--- fs/ocfs2/refcounttree.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)fs/ocfs2/refcounttree.c +0
-0
fs/ocfs2/refcounttree.c static int ocfs2_complete_reflink(struct inode *s_inode, · line 4091
Quoted 9 lines
fs/ocfs2/refcounttree.c +3
-0@@ -4083,6 +4083,9 @@ static int ocfs2_complete_reflink(struct inode *s_inode, di->i_attr = s_di->i_attr;if (preserve) { + t_inode->i_uid = s_inode->i_uid; + t_inode->i_gid = s_inode->i_gid; + t_inode->i_mode = s_inode->i_mode; di->i_uid = s_di->i_uid; di->i_gid = s_di->i_gid; di->i_mode = s_di->i_mode;
Looks reasonable to me.
--Mark
--
Mark Fasheh
PATCH 1/1 ocfs2: Update VFS inode's id info after reflink.
I have just verified this patch, it works fine for me.
Thanks,
-Jeff
Quoted 39 lines · Mark Fasheh
Quoted 15 lines · Tao Ma
In reflink we update the id info in the disk but forget to update the corresponding information in the VFS inode. So update them accordingly in case we want to preserve the attributes.
Reported-by Jeff Liu <[email protected]>Signed-off-by Tao Ma <[email protected]>--- fs/ocfs2/refcounttree.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)fs/ocfs2/refcounttree.c +0
-0fs/ocfs2/refcounttree.c static int ocfs2_complete_reflink(struct inode *s_inode, · line 4091
Quoted 9 lines
fs/ocfs2/refcounttree.c +3
-0@@ -4083,6 +4083,9 @@ static int ocfs2_complete_reflink(struct inode *s_inode, di->i_attr = s_di->i_attr;if (preserve) { + t_inode->i_uid = s_inode->i_uid; + t_inode->i_gid = s_inode->i_gid; + t_inode->i_mode = s_inode->i_mode; di->i_uid = s_di->i_uid; di->i_gid = s_di->i_gid; di->i_mode = s_di->i_mode;Looks reasonable to me.
Acked-by Mark Fasheh <[email protected]>--Mark--
Mark Fasheh_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel
PATCH 1/1 ocfs2: Update VFS inode's id info after reflink.
In reply to Tao MaQuoted 6 lines · Tao Ma
In reflink we update the id info in the disk but forget to update the corresponding information in the VFS inode. So update them accordingly in case we want to preserve the attributes.
Reported-by Jeff Liu <[email protected]>Signed-off-by Tao Ma <[email protected]>
This patch is now in the 'fixes' branch of ocfs2.git.
Joel
Signature · 8 lines
"Here's a nickle -- get yourself a better X server." - Keith Packard Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127