On Sun, Aug 16, 2009 at 08:25:36PM +1000, npiggin@xxxxxxx 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? -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html