From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [patch 3/5] fs: introduce new truncate sequence Date: Sun, 16 Aug 2009 15:39:29 -0400 Message-ID: <20090816193929.GA22219@infradead.org> References: <20090816102533.329473921@suse.de> <20090816102856.527647594@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , linux-fsdevel@vger.kernel.org, Christoph Hellwig To: npiggin@suse.de Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:50493 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755545AbZHPTjd (ORCPT ); Sun, 16 Aug 2009 15:39:33 -0400 Content-Disposition: inline In-Reply-To: <20090816102856.527647594@suse.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, Aug 16, 2009 at 08:25:36PM +1000, npiggin@suse.de wrote: > } > > +int simple_setsize(struct inode *inode, loff_t newsize) > +{ This wants a kerneldoc comment. Which should also mention that we can't easily use this helper if we actuall do need to truncate blocks on disk. > =================================================================== > --- linux-2.6.orig/fs/buffer.c > +++ linux-2.6/fs/buffer.c > @@ -1992,9 +1992,14 @@ int block_write_begin(struct file *file, > * prepare_write() may have instantiated a few blocks > * outside i_size. Trim these off again. Don't need > * i_size_read because we hold i_mutex. > + * > + * Filesystems which set i_op->new_truncate must > + * handle this themselves. Eventually this will go > + * away because everyone will be converted. > */ > if (pos + len > inode->i_size) > - vmtruncate(inode, inode->i_size); > + if (!inode->i_op->new_truncate) > + vmtruncate(inode, inode->i_size); Btw, what is you guestimate on how fast we'll get the conversion done? We have 19 instances of ->truncate currently. Your patch currently takes care of two, and I have an XFS patch leaving another 16. Can the maintainers on this list look into their filesystems to move forward?