From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [patch 4/5] VFS: allow filesystems to implement atomic open+truncate Date: Fri, 21 Sep 2007 13:44:20 +0100 Message-ID: <20070921124420.GB8088@infradead.org> References: <20070921122343.307289079@szeredi.hu> <20070921123334.643828369@szeredi.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: akpm@linux-foundation.org, hch@infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Miklos Szeredi Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:49398 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752710AbXIUMoV (ORCPT ); Fri, 21 Sep 2007 08:44:21 -0400 Content-Disposition: inline In-Reply-To: <20070921123334.643828369@szeredi.hu> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Sep 21, 2007 at 02:23:47PM +0200, Miklos Szeredi wrote: > From: Miklos Szeredi > > Add a new attribute flag ATTR_OPEN, with the meaning: "truncation was > initiated by open() due to the O_TRUNC flag". > > This way filesystems wanting to implement truncation within their > ->open() method can ignore such truncate requests. > > This is a quick & dirty hack, but it comes for free. Fine with me as it doesn't cause any active harm, but expect this to go away once the nfs intent mess is cleaned up and we'll get a real method for this kind of thing.