Thread (36 messages) 36 messages, 4 authors, 2009-07-13

Re: [rfc][patch 3/4] fs: new truncate sequence

From: Nick Piggin <hidden>
Date: 2009-07-07 15:48:09
Also in: linux-fsdevel, lkml

On Tue, Jul 07, 2009 at 11:07:58AM -0400, Christoph Hellwig wrote:
On Tue, Jul 07, 2009 at 05:02:57PM +0200, Nick Piggin wrote:
quoted
That's kind of why I liked it in inode_setattr better.

But if the filesystem defines its own ->setattr, then it could simply
not define a ->setsize and do the right thing in setattr. So this
calling convention seems not too bad.
Or the filesystem could just call into it's own setattr method
internally.  For that we'd switch back to passing the iattr to
->setsize.  For a filesystem that doesn't do anything special for
ATTR_SIZE ->setsize could point to the same function as ->setattr.

For filesystem where's it's really different they could be separate or
share helpers.
OK, so what do you suggest? If the filesystem defines
->setsize then do not pass ATTR_SIZE changes into setattr?
But then do you also not pass in ATTR_TIME cchanges to setattr
iff they  are together with ATTR_SIZE change? It sees also like
quite a difficult calling convention.

--
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