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

2014-02-26 Thread Hugh Dickins
On Wed, 26 Feb 2014, Dave Chinner wrote: > On Tue, Feb 25, 2014 at 09:25:40PM -0800, Hugh Dickins wrote: > > > But I wasn't really thinking of the offset > i_size case, just the > > offset + len >= i_size case: which would end with i_size at offset, > > and the areas you're worried about still

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

2014-02-26 Thread Dave Chinner
On Tue, Feb 25, 2014 at 09:25:40PM -0800, Hugh Dickins wrote: > On Wed, 26 Feb 2014, Dave Chinner wrote: > > On Tue, Feb 25, 2014 at 03:41:20PM -0800, Hugh Dickins wrote: > > > On Mon, 24 Feb 2014, Dave Chinner wrote: > > > > On Sat, Feb 22, 2014 at 09:06:25AM -0500, Theodore Ts'o wrote: > > > > >

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

2014-02-26 Thread Dave Chinner
On Tue, Feb 25, 2014 at 09:25:40PM -0800, Hugh Dickins wrote: On Wed, 26 Feb 2014, Dave Chinner wrote: On Tue, Feb 25, 2014 at 03:41:20PM -0800, Hugh Dickins wrote: On Mon, 24 Feb 2014, Dave Chinner wrote: On Sat, Feb 22, 2014 at 09:06:25AM -0500, Theodore Ts'o wrote: On Wed, Feb

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

2014-02-26 Thread Hugh Dickins
On Wed, 26 Feb 2014, Dave Chinner wrote: On Tue, Feb 25, 2014 at 09:25:40PM -0800, Hugh Dickins wrote: But I wasn't really thinking of the offset i_size case, just the offset + len = i_size case: which would end with i_size at offset, and the areas you're worried about still beyond EOF -

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

2014-02-25 Thread Hugh Dickins
On Wed, 26 Feb 2014, Dave Chinner wrote: > On Tue, Feb 25, 2014 at 03:41:20PM -0800, Hugh Dickins wrote: > > On Mon, 24 Feb 2014, Dave Chinner wrote: > > > On Sat, Feb 22, 2014 at 09:06:25AM -0500, Theodore Ts'o wrote: > > > > On Wed, Feb 19, 2014 at 01:37:43AM +0900, Namjae Jeon wrote: > > > > >

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

2014-02-25 Thread Dave Chinner
On Tue, Feb 25, 2014 at 03:41:20PM -0800, Hugh Dickins wrote: > On Mon, 24 Feb 2014, Dave Chinner wrote: > > On Sat, Feb 22, 2014 at 09:06:25AM -0500, Theodore Ts'o wrote: > > > On Wed, Feb 19, 2014 at 01:37:43AM +0900, Namjae Jeon wrote: > > > > + /* > > > > +* There is no need to

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

2014-02-25 Thread Hugh Dickins
On Mon, 24 Feb 2014, Dave Chinner wrote: > On Sat, Feb 22, 2014 at 09:06:25AM -0500, Theodore Ts'o wrote: > > 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

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

2014-02-25 Thread Hugh Dickins
On Mon, 24 Feb 2014, Dave Chinner wrote: On Sat, Feb 22, 2014 at 09:06:25AM -0500, Theodore Ts'o wrote: 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

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

2014-02-25 Thread Dave Chinner
On Tue, Feb 25, 2014 at 03:41:20PM -0800, Hugh Dickins wrote: On Mon, 24 Feb 2014, Dave Chinner wrote: On Sat, Feb 22, 2014 at 09:06:25AM -0500, Theodore Ts'o wrote: On Wed, Feb 19, 2014 at 01:37:43AM +0900, Namjae Jeon wrote: + /* +* There is no need to overlap

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

2014-02-25 Thread Hugh Dickins
On Wed, 26 Feb 2014, Dave Chinner wrote: On Tue, Feb 25, 2014 at 03:41:20PM -0800, Hugh Dickins wrote: On Mon, 24 Feb 2014, Dave Chinner wrote: On Sat, Feb 22, 2014 at 09:06:25AM -0500, Theodore Ts'o wrote: On Wed, Feb 19, 2014 at 01:37:43AM +0900, Namjae Jeon wrote: + /* +

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

2014-02-23 Thread Dave Chinner
On Sat, Feb 22, 2014 at 09:06:25AM -0500, Theodore Ts'o wrote: > 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 &

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

2014-02-23 Thread Dave Chinner
On Sat, Feb 22, 2014 at 09:06:25AM -0500, Theodore Ts'o wrote: 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

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

2014-02-22 Thread Theodore Ts'o
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 >=

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

2014-02-22 Thread Theodore Ts'o
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 =