Re: [rfc][patch 3/4] fs: new truncate sequence
From: Christoph Hellwig <hch@infradead.org>
Date: 2009-07-08 12:40:56
Also in:
linux-fsdevel, lkml
On Wed, Jul 08, 2009 at 02:34:12PM +0200, Nick Piggin wrote:
On Wed, Jul 08, 2009 at 06:47:01AM -0400, Christoph Hellwig wrote:quoted
On Wed, Jul 08, 2009 at 08:32:25AM +0200, Nick Piggin wrote:quoted
Thanks for the patch, I think I will fold it in to the series. I think we probably do need to call simple_setsize in inode_setattr though (unless you propose to eventually convert every filesystem to define a .setattr). This would also require eg. your ext2 conversion to strip ATTR_SIZE before passing through to inode_setattr.Yes, we should eventually make .setattr mandatory. Doing a default action when a method lacks tends to cause more issues than it solves. I'm happy to help in doing that part of the conversion (and also other bits)OK well here is what I have now for 3/4 and 4/4. Basically just folded your patch on top, changed ordering of some checks, have fs clear ATTR_SIZE before calling inode_setattr, add a .new_truncate field to check against rather than .truncate, and provide a default ATTR_SIZE handler in inode_setattr (simple_setsize).
Can we leave that last part out? Converting those filesystems that do not have a ->truncate method to a trivial ->setattr is easy, and I can do it pretty soon (next week probably). That allows us to get rid of all that ATTR_SIZE clearing which is pretty ugly.
+ * + * Filesystems which define i_op->new_truncate must + * handle this themselves. Eventually this will go + * away because everyone will be converted.
s/define/set/ ? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>