|
|
Log in / Subscribe / Register

Re: [PATCH v5 1/10] fs: Add new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate

From:  Theodore Ts'o <tytso-AT-mit.edu>
To:  Namjae Jeon <linkinjeon-AT-gmail.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
Message-ID:  <20140222140625.GD26637@thunk.org>
Cc:  jack-AT-suse.cz, Namjae Jeon <namjae.jeon-AT-samsung.com>, linux-kernel-AT-vger.kernel.org, xfs-AT-oss.sgi.com, bpm-AT-sgi.com, adilger.kernel-AT-dilger.ca, mtk.manpages-AT-gmail.com, Ashish Sangwan <a.sangwan-AT-samsung.com>, linux-fsdevel-AT-vger.kernel.org, lczerner-AT-redhat.com, linux-ext4-AT-vger.kernel.org, viro-AT-zeniv.linux.org.uk
Archive‑link:  Article

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




to post comments


Copyright © 2014, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds