All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tao Ma <tao.ma@oracle.com>
To: joel Becker <joel.becker@oracle.com>,
	Christoph Hellwig <hch@lst.de>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Nick Piggin <npiggin@suse.de>,
	mfasheh@suse.com
Subject: Re: [PATCH v3] ocfs2: Let ocfs2_setattr use new truncate sequence.
Date: Fri, 11 Jun 2010 08:00:09 +0800	[thread overview]
Message-ID: <4C117C89.4050600@oracle.com> (raw)
In-Reply-To: <20100610181158.GA5934@mail.oracle.com>

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


      reply	other threads:[~2010-06-11  0:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10  3:53 [PATCH v2] ocfs2: Let ocfs2_setattr use new truncate sequence Tao Ma
2010-06-10  4:42 ` Nick Piggin
2010-06-10  5:06   ` Tao Ma
2010-06-10  5:08   ` [PATCH v3] " Tao Ma
2010-06-10  5:58     ` Joel Becker
2010-06-10  8:27     ` Christoph Hellwig
2010-06-10  8:44       ` Tao Ma
2010-06-10  8:47       ` Joel Becker
2010-06-10 12:09         ` Tao Ma
2010-06-10 12:09           ` Tao Ma
2010-06-10 12:28           ` Nick Piggin
2010-06-10 18:11           ` Joel Becker
2010-06-11  0:00             ` Tao Ma [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C117C89.4050600@oracle.com \
    --to=tao.ma@oracle.com \
    --cc=hch@lst.de \
    --cc=joel.becker@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=npiggin@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.