lkml.org 
[lkml]   [2009]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [rfc][patch 3/4] fs: new truncate sequence
On Wed, Jul 08, 2009 at 08:40:56AM -0400, Christoph Hellwig wrote:
> 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:
> > > On Wed, Jul 08, 2009 at 08:32:25AM +0200, Nick Piggin wrote:
> > > > 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.

Is it not common procedure to use when handling some attributes
and passing others to inode_setattr?

Anyway, no big deal either way. And it's using .new_truncate, so
there is no rush to convert everything (and it will remain back
compatible either way until we remove .new_truncate and all the
vmtruncate calls).


>
> > + *
> > + * Filesystems which define i_op->new_truncate must
> > + * handle this themselves. Eventually this will go
> > + * away because everyone will be converted.
>
> s/define/set/ ?

Yes.



\
 
 \ /
  Last update: 2009-07-08 14:51    [W:0.075 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site