All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Namjae Jeon <linkinjeon@gmail.com>
Cc: jack@suse.cz, Namjae Jeon <namjae.jeon@samsung.com>,
	linux-kernel@vger.kernel.org, xfs@oss.sgi.com, bpm@sgi.com,
	adilger.kernel@dilger.ca, mtk.manpages@gmail.com,
	Ashish Sangwan <a.sangwan@samsung.com>,
	linux-fsdevel@vger.kernel.org, lczerner@redhat.com,
	linux-ext4@vger.kernel.org, viro@zeniv.linux.org.uk
Subject: Re: [PATCH v5 1/10] fs: Add new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate
Date: Sat, 22 Feb 2014 09:06:25 -0500	[thread overview]
Message-ID: <20140222140625.GD26637@thunk.org> (raw)
In-Reply-To: <1392741464-20029-1-git-send-email-linkinjeon@gmail.com>

On Wed, Feb 19, 2014 at 01:37:43AM +0900, Namjae Jeon wrote:
> +	/*
> +	 * There is no need to overlap collapse range with EOF, in which case
> +	 * it is effectively a truncate operation
> +	 */
> +	if ((mode & FALLOC_FL_COLLAPSE_RANGE) &&
> +	    (offset + len >= i_size_read(inode)))
> +		return -EINVAL;
> +

I wonder if we should just translate a collapse range that is
equivalent to a truncate operation to, in fact, be a truncate
operation?

						- Ted

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

WARNING: multiple messages have this Message-ID (diff)
From: "Theodore Ts'o" <tytso@mit.edu>
To: Namjae Jeon <linkinjeon@gmail.com>
Cc: viro@zeniv.linux.org.uk, david@fromorbit.com, bpm@sgi.com,
	adilger.kernel@dilger.ca, jack@suse.cz, mtk.manpages@gmail.com,
	lczerner@redhat.com, linux-fsdevel@vger.kernel.org,
	xfs@oss.sgi.com, linux-ext4@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Namjae Jeon <namjae.jeon@samsung.com>,
	Ashish Sangwan <a.sangwan@samsung.com>
Subject: Re: [PATCH v5 1/10] fs: Add new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate
Date: Sat, 22 Feb 2014 09:06:25 -0500	[thread overview]
Message-ID: <20140222140625.GD26637@thunk.org> (raw)
In-Reply-To: <1392741464-20029-1-git-send-email-linkinjeon@gmail.com>

On Wed, Feb 19, 2014 at 01:37:43AM +0900, Namjae Jeon wrote:
> +	/*
> +	 * There is no need to overlap collapse range with EOF, in which case
> +	 * it is effectively a truncate operation
> +	 */
> +	if ((mode & FALLOC_FL_COLLAPSE_RANGE) &&
> +	    (offset + len >= i_size_read(inode)))
> +		return -EINVAL;
> +

I wonder if we should just translate a collapse range that is
equivalent to a truncate operation to, in fact, be a truncate
operation?

						- Ted

  reply	other threads:[~2014-02-22 14:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 16:37 [PATCH v5 1/10] fs: Add new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate Namjae Jeon
2014-02-18 16:37 ` Namjae Jeon
2014-02-22 14:06 ` Theodore Ts'o [this message]
2014-02-22 14:06   ` Theodore Ts'o
2014-02-23 21:36   ` Dave Chinner
2014-02-23 21:36     ` Dave Chinner
2014-02-25 23:41     ` Hugh Dickins
2014-02-25 23:41       ` Hugh Dickins
2014-02-25 23:41       ` Hugh Dickins
2014-02-26  1:57       ` Dave Chinner
2014-02-26  1:57         ` Dave Chinner
2014-02-26  1:57         ` Dave Chinner
2014-02-26  5:25         ` Hugh Dickins
2014-02-26  5:25           ` Hugh Dickins
2014-02-26  5:25           ` Hugh Dickins
2014-02-26 10:04           ` Dave Chinner
2014-02-26 10:04             ` Dave Chinner
2014-02-26 10:04             ` Dave Chinner
2014-02-26 23:48             ` Hugh Dickins
2014-02-26 23:48               ` Hugh Dickins
2014-02-26 23:48               ` Hugh Dickins

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=20140222140625.GD26637@thunk.org \
    --to=tytso@mit.edu \
    --cc=a.sangwan@samsung.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=bpm@sgi.com \
    --cc=jack@suse.cz \
    --cc=lczerner@redhat.com \
    --cc=linkinjeon@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=namjae.jeon@samsung.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xfs@oss.sgi.com \
    /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.