linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: npiggin@suse.de
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-fsdevel@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [patch 3/5] fs: introduce new truncate sequence
Date: Sun, 16 Aug 2009 15:39:29 -0400	[thread overview]
Message-ID: <20090816193929.GA22219@infradead.org> (raw)
In-Reply-To: <20090816102856.527647594@suse.de>

On Sun, Aug 16, 2009 at 08:25:36PM +1000, npiggin@suse.de wrote:
>  }
>  
> +int simple_setsize(struct inode *inode, loff_t newsize)
> +{

This wants a kerneldoc comment.  Which should also mention that we can't
easily use this helper if we actuall do need to truncate blocks on disk.


> ===================================================================
> --- linux-2.6.orig/fs/buffer.c
> +++ linux-2.6/fs/buffer.c
> @@ -1992,9 +1992,14 @@ int block_write_begin(struct file *file,
>  			 * prepare_write() may have instantiated a few blocks
>  			 * outside i_size.  Trim these off again. Don't need
>  			 * i_size_read because we hold i_mutex.
> +			 *
> +			 * Filesystems which set i_op->new_truncate must
> +			 * handle this themselves. Eventually this will go
> +			 * away because everyone will be converted.
>  			 */
>  			if (pos + len > inode->i_size)
> -				vmtruncate(inode, inode->i_size);
> +				if (!inode->i_op->new_truncate)
> +					vmtruncate(inode, inode->i_size);

Btw, what is you guestimate on how fast we'll get the conversion done?

We have 19 instances of ->truncate currently.  Your patch currently
takes care of two, and I have an XFS patch leaving another 16.

Can the maintainers on this list look into their filesystems to move
forward?  

  reply	other threads:[~2009-08-16 19:39 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 [this message]
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
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=20090816193929.GA22219@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=npiggin@suse.de \
    /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).