From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: Filesystem setattr/truncate notes and problems Date: Thu, 3 Jun 2010 09:32:38 +0200 Message-ID: <20100603073238.GA3866@lst.de> References: <20100601133923.GT9453@laptop> <20100601134801.GA11061@lst.de> <20100601135655.GU9453@laptop> <20100602195538.GG6152@laptop> <20100602200855.GH6152@laptop> <20100603072812.GA3346@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Al Viro , linux-fsdevel@vger.kernel.org, Miklos Szeredi To: Nick Piggin Return-path: Received: from verein.lst.de ([213.95.11.210]:38913 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751783Ab0FCHcp (ORCPT ); Thu, 3 Jun 2010 03:32:45 -0400 Content-Disposition: inline In-Reply-To: <20100603072812.GA3346@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Jun 03, 2010 at 09:28:12AM +0200, Christoph Hellwig wrote: > Which means XFS behaviour for truncate while not strictly against > Posix is at least unexpected. I'll fix it up. Actually I'd prefer if you could throw this into your do_truncate patch so that filesystems don't get the clear suid request if the file size doesn't change. That way I can just change XFS to do everything requested but the actual size update for that case. In fact just clearing out ATTR_SIZE in that case in do_truncate would be nice. Which brings up the question: are we guaranteed to have stable and uptodate i_size in do_truncate? I think normally we'd need a ->getattr first to stabilize it.