All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, Jan Kara <jack@suse.cz>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org
Subject: Re: [rfc][patch 3/4] fs: new truncate sequence
Date: Wed, 8 Jul 2009 14:48:24 +0200	[thread overview]
Message-ID: <20090708124824.GS2714@wotan.suse.de> (raw)
In-Reply-To: <20090708124056.GA26701@infradead.org>

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.


WARNING: multiple messages have this Message-ID (diff)
From: Nick Piggin <npiggin@suse.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, Jan Kara <jack@suse.cz>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org
Subject: Re: [rfc][patch 3/4] fs: new truncate sequence
Date: Wed, 8 Jul 2009 14:48:24 +0200	[thread overview]
Message-ID: <20090708124824.GS2714@wotan.suse.de> (raw)
In-Reply-To: <20090708124056.GA26701@infradead.org>

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.

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

  reply	other threads:[~2009-07-08 12:48 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-07 14:44 [rfc][patch 1/4] fs: new truncate helpers Nick Piggin
2009-07-07 14:44 ` Nick Piggin
2009-07-07 14:46 ` [rfc][patch 2/4] fs: use " Nick Piggin
2009-07-07 14:46   ` Nick Piggin
2009-07-07 14:53   ` Christoph Hellwig
2009-07-07 14:53     ` Christoph Hellwig
2009-07-07 14:48 ` [rfc][patch 3/4] fs: new truncate sequence Nick Piggin
2009-07-07 14:48   ` Nick Piggin
2009-07-07 14:58   ` Christoph Hellwig
2009-07-07 14:58     ` Christoph Hellwig
2009-07-07 15:02     ` Nick Piggin
2009-07-07 15:02       ` Nick Piggin
2009-07-07 15:07       ` Christoph Hellwig
2009-07-07 15:07         ` Christoph Hellwig
2009-07-07 15:48         ` Nick Piggin
2009-07-07 15:48           ` Nick Piggin
2009-07-07 16:30           ` Christoph Hellwig
2009-07-07 16:30             ` Christoph Hellwig
2009-07-08  6:32             ` Nick Piggin
2009-07-08  6:32               ` Nick Piggin
2009-07-08 10:47               ` Christoph Hellwig
2009-07-08 10:47                 ` Christoph Hellwig
2009-07-08 12:34                 ` Nick Piggin
2009-07-08 12:34                   ` Nick Piggin
2009-07-08 12:40                   ` Christoph Hellwig
2009-07-08 12:40                     ` Christoph Hellwig
2009-07-08 12:48                     ` Nick Piggin [this message]
2009-07-08 12:48                       ` Nick Piggin
2009-07-08 16:07                   ` Boaz Harrosh
2009-07-08 16:07                     ` Boaz Harrosh
2009-07-09  7:51                     ` Nick Piggin
2009-07-09  7:51                       ` Nick Piggin
2009-07-12  8:55                       ` Boaz Harrosh
2009-07-12  8:55                         ` Boaz Harrosh
2009-07-12 14:47                         ` Christoph Hellwig
2009-07-12 14:47                           ` Christoph Hellwig
2009-07-12 15:00                           ` Boaz Harrosh
2009-07-12 15:00                             ` Boaz Harrosh
2009-07-13  6:59                           ` Nick Piggin
2009-07-13  6:59                             ` Nick Piggin
2009-07-13  8:54                             ` Boaz Harrosh
2009-07-13  8:54                               ` Boaz Harrosh
2009-07-13  9:00                               ` Nick Piggin
2009-07-13  9:00                                 ` Nick Piggin
2009-07-13 11:17                                 ` Boaz Harrosh
2009-07-13 11:17                                   ` Boaz Harrosh
2009-07-13 11:32                                   ` Nick Piggin
2009-07-13 11:32                                     ` Nick Piggin
2009-07-13 13:53                             ` Christoph Hellwig
2009-07-13 13:53                               ` Christoph Hellwig
2009-07-13 14:05                               ` Nick Piggin
2009-07-13 14:05                                 ` Nick Piggin
2009-07-13 14:10                                 ` Christoph Hellwig
2009-07-13 14:10                                   ` Christoph Hellwig
2009-07-07 14:48 ` [rfc][patch 1/4] fs: new truncate helpers Christoph Hellwig
2009-07-07 14:48   ` Christoph Hellwig
2009-07-07 14:49 ` [rfc][patch 4/4] fs: tmpfs, ext2 use new truncate Nick Piggin
2009-07-07 14:49   ` Nick Piggin
2009-07-07 16:38   ` Christoph Hellwig
2009-07-07 16:38     ` Christoph Hellwig
2009-07-08  6:53     ` Nick Piggin
2009-07-08  6:53       ` Nick Piggin
2009-07-08 11:14       ` Jan Kara
2009-07-08 11:14         ` Jan Kara
2009-07-08 12:22         ` Nick Piggin
2009-07-08 12:22           ` Nick Piggin
2009-07-08 12:32           ` Christoph Hellwig
2009-07-08 12:32             ` Christoph Hellwig
2009-07-08 12:39             ` Nick Piggin
2009-07-08 12:39               ` Nick Piggin
2009-07-08 13:49               ` Christoph Hellwig
2009-07-08 13:49                 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090708124824.GS2714@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.