xfs
[Top] [All Lists]

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

To: Namjae Jeon <linkinjeon@xxxxxxxxx>
Subject: Re: [PATCH v5 1/10] fs: Add new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate
From: Theodore Ts'o <tytso@xxxxxxx>
Date: Sat, 22 Feb 2014 09:06:25 -0500
Cc: viro@xxxxxxxxxxxxxxxxxx, david@xxxxxxxxxxxxx, bpm@xxxxxxx, adilger.kernel@xxxxxxxxx, jack@xxxxxxx, mtk.manpages@xxxxxxxxx, lczerner@xxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Namjae Jeon <namjae.jeon@xxxxxxxxxxx>, Ashish Sangwan <a.sangwan@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=thunk.org; s=mail; t=1393077986; bh=9nM+hlNV6jorTwpfc68FZ/MhV3hbFNeOfO1WbWCYKLA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JiieLQvSY7SZCRoLHu1v90SMcoHcmacxno1LPLc3s0HyCVWmff4jQ+7lniYo/UR2e uIHRHLef3bh+oNd5UPUSNfSB9uRcUf3BzcEHYr8w+62J6WKnV9NcIv3xhIq3tSX6a8 LI8+tj+ElWumhJO2gYqEs6ZFwfvRHFLP09AUUnrg=
In-reply-to: <1392741464-20029-1-git-send-email-linkinjeon@xxxxxxxxx>
Mail-followup-to: Theodore Ts'o <tytso@xxxxxxx>, Namjae Jeon <linkinjeon@xxxxxxxxx>, viro@xxxxxxxxxxxxxxxxxx, david@xxxxxxxxxxxxx, bpm@xxxxxxx, adilger.kernel@xxxxxxxxx, jack@xxxxxxx, mtk.manpages@xxxxxxxxx, lczerner@xxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Namjae Jeon <namjae.jeon@xxxxxxxxxxx>, Ashish Sangwan <a.sangwan@xxxxxxxxxxx>
References: <1392741464-20029-1-git-send-email-linkinjeon@xxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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

<Prev in Thread] Current Thread [Next in Thread>