From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [patch 3/5] fs: introduce new truncate sequence Date: Mon, 17 Aug 2009 20:06:12 +0200 Message-ID: <20090817180612.GA9144@lst.de> References: <20090816102533.329473921@suse.de> <20090816102856.527647594@suse.de> <20090816193929.GA22219@infradead.org> <20090817164144.GJ9962@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Andrew Morton , linux-fsdevel@vger.kernel.org, Christoph Hellwig To: Nick Piggin Return-path: Received: from verein.lst.de ([213.95.11.210]:39342 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752245AbZHQSGZ (ORCPT ); Mon, 17 Aug 2009 14:06:25 -0400 Content-Disposition: inline In-Reply-To: <20090817164144.GJ9962@wotan.suse.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Aug 17, 2009 at 06:41:44PM +0200, Nick Piggin wrote: > Just wonder what you think of this for an updated patch. Main changes > since last time are changelog changed, more comments, and addition of > simple_setattr and inode_set_attributes. I was going to leave > simple_setattr for later, but now I found when converting the simple > filesystem ramfs that we basically need it anyway. > > inode_set_attributes is also following your suggestion and if we use > it then we don't have to do that masking away ATTR_SIZE then calling > inode_setattr that you didn't like (and I agree with). I like this a lot. But please change the inode_set_attributes name, it's awkward and totally falls out of the scheme. It defintively should be _setattr. Not sure about what to use for the . Maybe just generic_setattr, mirroring generic_getattr? Btw, one idea on how to avoid having to touch all the begin_write/end_write/direct_IO instances: What about passing another callback to them, in addition to the get_blocks also a trim_blocks which we call to trim blocks over i_size. That would be the old ->truncate minus the block_truncate_page.