linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: Christoph Hellwig <hch@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [patch 3/5] fs: introduce new truncate sequence
Date: Tue, 18 Aug 2009 11:19:38 +0200	[thread overview]
Message-ID: <20090818091938.GN9962@wotan.suse.de> (raw)
In-Reply-To: <20090817180612.GA9144@lst.de>

On Mon, Aug 17, 2009 at 08:06:12PM +0200, Christoph Hellwig wrote:
> On Mon, Aug 17, 2009 at 06:41:44PM +0200, Nick Piggin wrote:
> > Just wonder what you think of this for an updated patch. Main changes
> > since last time are changelog changed, more comments, and addition of 
> > simple_setattr and inode_set_attributes. I was going to leave
> > simple_setattr for later, but now I found when converting the simple
> > filesystem ramfs that we basically need it anyway.
> > 
> > inode_set_attributes is also following your suggestion and if we use
> > it then we don't have to do that masking away ATTR_SIZE then calling
> > inode_setattr that you didn't like (and I agree with).
> 
> I like this a lot.  But please change the inode_set_attributes name,
> it's awkward and totally falls out of the scheme.  It defintively should
> be <something>_setattr.  Not sure about what to use for the <something>.
> Maybe just generic_setattr, mirroring generic_getattr?

Yeah I agree the name wasn't so good. I guess generic_setattr is better
yes. I will call it that and we can feel free to change it if there is
a better idea before it is merged into Linus.

 
> Btw, one idea on how to avoid having to touch all the
> begin_write/end_write/direct_IO instances:  What about passing another
> callback to them, in addition to the get_blocks also a trim_blocks
> which we call to trim blocks over i_size.  That would be the old
> ->truncate minus the block_truncate_page.

I guess it doesn't fit into non-block filesystems, but it could just
be `cleanup` or something. But on the other hand, I think it is a
bit filesystem specific (eg. what to do in case of error) and it
isn't much problem to add them to write_begin/end functions.

But this is a good question if any fs developers have a strong
preference one way or the other. I think I will just leave it as is
for now because I have done a few conversions already, but we can
always change it later.


  reply	other threads:[~2009-08-18  9:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-16 10:25 [patch 0/5] new truncate sequence npiggin
2009-08-16 10:25 ` [patch 1/5] fs: new truncate helpers npiggin
2009-08-16 10:25 ` [patch 2/5] fs: use " npiggin-l3A5Bk7waGM
2009-08-16 10:25 ` [patch 3/5] fs: introduce new truncate sequence npiggin
2009-08-16 19:39   ` Christoph Hellwig
2009-08-17  6:38     ` Nick Piggin
2009-08-17 16:41     ` Nick Piggin
2009-08-17 18:06       ` Christoph Hellwig
2009-08-18  9:19         ` Nick Piggin [this message]
2009-08-16 10:25 ` [patch 4/5] tmpfs: convert to use the new truncate convention npiggin
2009-08-16 18:38   ` Hugh Dickins
2009-08-17  7:32     ` Nick Piggin
2009-08-16 10:25 ` [patch 5/5] ext2: " npiggin
2009-08-16 20:16   ` Christoph Hellwig
2009-08-17  6:42     ` Nick Piggin
2009-08-17 11:09       ` Boaz Harrosh
2009-08-17 16:44         ` Nick Piggin
  -- strict thread matches above, loose matches on Subject: below --
2009-07-10  7:30 [patch 0/5] new truncate sequence patchset npiggin
2009-07-10  7:30 ` [patch 3/5] fs: introduce new truncate sequence npiggin

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=20090818091938.GN9962@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).