All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2: Update VFS inode's id info after reflink.
@ 2010-04-21  6:05 Tao Ma
  2010-04-21 22:36 ` Mark Fasheh
  2010-04-23 21:44 ` Joel Becker
  0 siblings, 2 replies; 4+ messages in thread
From: Tao Ma @ 2010-04-21  6:05 UTC (permalink / raw)
  To: ocfs2-devel

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 <jeff.liu@oracle.com>
Signed-off-by: Tao Ma <tao.ma@oracle.com>
---
 fs/ocfs2/refcounttree.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index 8ae65c9..a8e8572 100644
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -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;
-- 
1.6.3.3.334.g916e1.dirty

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2: Update VFS inode's id info after reflink.
  2010-04-21  6:05 [Ocfs2-devel] [PATCH] ocfs2: Update VFS inode's id info after reflink Tao Ma
@ 2010-04-21 22:36 ` Mark Fasheh
  2010-04-22  7:05   ` jeff.liu
  2010-04-23 21:44 ` Joel Becker
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Fasheh @ 2010-04-21 22:36 UTC (permalink / raw)
  To: ocfs2-devel

On Wed, Apr 21, 2010 at 02:05:55PM +0800, Tao Ma wrote:
> 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 <jeff.liu@oracle.com>
> Signed-off-by: Tao Ma <tao.ma@oracle.com>
> ---
>  fs/ocfs2/refcounttree.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
> index 8ae65c9..a8e8572 100644
> --- a/fs/ocfs2/refcounttree.c
> +++ b/fs/ocfs2/refcounttree.c
> @@ -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 <mfasheh@suse.com>
	--Mark

--
Mark Fasheh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2: Update VFS inode's id info after reflink.
  2010-04-21 22:36 ` Mark Fasheh
@ 2010-04-22  7:05   ` jeff.liu
  0 siblings, 0 replies; 4+ messages in thread
From: jeff.liu @ 2010-04-22  7:05 UTC (permalink / raw)
  To: ocfs2-devel

I have just verified this patch, it works fine for me.

Thanks,
-Jeff

Mark Fasheh wrote:
> On Wed, Apr 21, 2010 at 02:05:55PM +0800, Tao Ma wrote:
>> 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 <jeff.liu@oracle.com>
>> Signed-off-by: Tao Ma <tao.ma@oracle.com>
>> ---
>>  fs/ocfs2/refcounttree.c |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
>> index 8ae65c9..a8e8572 100644
>> --- a/fs/ocfs2/refcounttree.c
>> +++ b/fs/ocfs2/refcounttree.c
>> @@ -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 <mfasheh@suse.com>
> 	--Mark
> 
> --
> Mark Fasheh
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2: Update VFS inode's id info after reflink.
  2010-04-21  6:05 [Ocfs2-devel] [PATCH] ocfs2: Update VFS inode's id info after reflink Tao Ma
  2010-04-21 22:36 ` Mark Fasheh
@ 2010-04-23 21:44 ` Joel Becker
  1 sibling, 0 replies; 4+ messages in thread
From: Joel Becker @ 2010-04-23 21:44 UTC (permalink / raw)
  To: ocfs2-devel

On Wed, Apr 21, 2010 at 02:05:55PM +0800, Tao Ma wrote:
> 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 <jeff.liu@oracle.com>
> Signed-off-by: Tao Ma <tao.ma@oracle.com>

This patch is now in the 'fixes' branch of ocfs2.git.

Joel

-- 

"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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-23 21:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-21  6:05 [Ocfs2-devel] [PATCH] ocfs2: Update VFS inode's id info after reflink Tao Ma
2010-04-21 22:36 ` Mark Fasheh
2010-04-22  7:05   ` jeff.liu
2010-04-23 21:44 ` Joel Becker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.