Thread (38 messages) 38 messages, 5 authors, 2009-07-06

Re: [PATCH 02/11] vfs: Add better VFS support for page_mkwrite when blocksize < pagesize

From: Nick Piggin <hidden>
Date: 2009-06-26 08:42:25
Also in: linux-fsdevel, lkml

On Thu, Jun 25, 2009 at 01:47:55PM -0400, Christoph Hellwig wrote:
On Thu, Jun 25, 2009 at 06:17:53PM +0200, Nick Piggin wrote:
quoted
Basically the problems is that i_op->truncate a) cannot return an error
(which is causing problems missing -EIO today anyway), and b) is called
after i_size update which makes it not possible to error-out without
races anyway, and c) does not get the old i_size so you can't unmap the
last partial page with it.

My patch is basically moving ->truncate call into setattr, and have
the filesystem call vmtruncate. I've jt to clean up loose ends.
We absolutely need to get rid of ->truncate.  Due to the above issues
XFS already does the majority of the truncate work from setattr, and it
works pretty well.
Yes well we could get rid of ->truncate and have filesystems do it
themselves in setattr, but I figure that moving truncate into
generic setattr is helpful (makes conversions a bit easier too).
Did you see my patch? What do you think of that basic approach?

 The only problem is the generic aops calling
vmtruncate directly.
What should be done is require that filesystems trim blocks past
i_size in case of any errors. I actually need to fix up a few
existing bugs in this area too, so I'll look at this..

--
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help