cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] Check for immutable flag in fallocate path
       [not found] <4D6221B8.9040303@gmail.com>
@ 2011-02-21 12:46 ` Christoph Hellwig
       [not found] ` <4D6F5473.2070709@gmail.com>
  1 sibling, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2011-02-21 12:46 UTC (permalink / raw)
  To: cluster-devel.redhat.com

On Mon, Feb 21, 2011 at 09:26:32AM +0100, Marco Stornelli wrote:
> From: Marco Stornelli <marco.stornelli@gmail.com>
> 
> All fs must check for the immutable flag in their fallocate callback.
> It's possible to have a race condition in this scenario: an application
> open a file in read/write and it does something, meanwhile root set the
> immutable flag on the file, the application at that point can call
> fallocate with success. Only Ocfs2 check for the immutable flag at the
> moment.

Please add the check in fs/open.c:do_fallocate() so that it covers all
filesystems.



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

* [Cluster-devel] [PATCH v2] Check for immutable flag in fallocate path
       [not found]   ` <20110303213903.GL15097@dastard>
@ 2011-03-14 10:24     ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2011-03-14 10:24 UTC (permalink / raw)
  To: cluster-devel.redhat.com

On Fri, Mar 04, 2011 at 08:39:03AM +1100, Dave Chinner wrote:
> WTF?  Why does append mode have any effect on whether we can punch
> holes in a file or not? There's no justification for adding this in
> the commit message. Why is it even in a patch that is for checking
> immutable inodes? What is the point of adding it, when all that will
> happen is people will switch to XFS_IOC_UNRESVSP which has never had
> this limitation?

xfs_ioc_space unconditionally rejects inodes with S_APPEND set for
all preallocation / hole punching ioctls.  This might be overzealous for
preallocations not changing the size, or just extending i_size, but it's
IMHO entirely correct for hole punching.  



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

end of thread, other threads:[~2011-03-14 10:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4D6221B8.9040303@gmail.com>
2011-02-21 12:46 ` [Cluster-devel] [PATCH] Check for immutable flag in fallocate path Christoph Hellwig
     [not found] ` <4D6F5473.2070709@gmail.com>
     [not found]   ` <20110303213903.GL15097@dastard>
2011-03-14 10:24     ` [Cluster-devel] [PATCH v2] " Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).