lkml.org 
[lkml]   [2010]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] ocfs2: Let ocfs2_setattr use new truncate sequence.
Joel Becker wrote:
> On Thu, Jun 10, 2010 at 08:09:36PM +0800, Tao Ma wrote:
>
>> Joel Becker wrote:
>>
>>> Is your concern that the u/gid checks may be against stale ids?
>>>
>> So I think we should have one inode_change_ok before the cluster
>> lock and another after the cluster lock.
>> The first one will save us a lot of cluster lock effort if the user
>> pass us the wrong arguments while the later
>> one will test again with the refreshed inode info.
>>
>
> But what if the other node has given us permission, and then we
> fail? Say the file was owned by you. On node 2, root sets it to be
> owned by me. Then on node 1, I go to change the file permissions.
> inode_change_ok() will fail, because the in-memory inode still thinks
> you are the owner.
> I guess it does need to be under the lock.
>
OK, so I will revise my patch to move it under cluster lock.

Regards,
Tao



\
 
 \ /
  Last update: 2010-06-11 02:03    [W:0.076 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site