From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 0/6] first step toward the new truncate sequence Date: Mon, 31 May 2010 15:18:19 +0200 Message-ID: <20100531131819.GA19512@lst.de> References: <20100530204932.GA21002@lst.de> <4C038648.4030304@panasas.com> <4C038CBF.7050902@panasas.com> <20100531131551.GH9453@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Boaz Harrosh , Christoph Hellwig , viro@zeniv.linux.org.uk, jack@suse.cz, linux-fsdevel@vger.kernel.org To: Nick Piggin Return-path: Received: from verein.lst.de ([213.95.11.210]:52879 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753797Ab0EaNSY (ORCPT ); Mon, 31 May 2010 09:18:24 -0400 Content-Disposition: inline In-Reply-To: <20100531131551.GH9453@laptop> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, May 31, 2010 at 11:15:51PM +1000, Nick Piggin wrote: > Not sure. Some callers appear not to set ATTR_CTIME/ATTR_MTIME when > making ATTR_SIZE changes. And I don't know the history of the required > sync semantics here either. It signals the difference between truncate and ftruncate. See the comment in xfs_setattr: /* * Only change the c/mtime if we are changing the size * or we are explicitly asked to change it. This handles * the semantic difference between truncate() and ftruncate() * as implemented in the VFS. * * The regular truncate() case without ATTR_CTIME and ATTR_MTIME * is a special case where we need to update the times despite * not having these flags set. For all other operations the * VFS set these flags explicitly if it wants a timestamp * update. */