Thread (9 messages) 9 messages, 4 authors, 2007-05-17

Re: [PATCH 1/5][TAKE3] fallocate() implementation on i86, x86_64 and powerpc

From: Amit K. Arora <hidden>
Date: 2007-05-16 12:37:00
Also in: linux-fsdevel, linux-xfs, lkml

On Wed, May 16, 2007 at 07:21:16AM -0500, Dave Kleikamp wrote:
On Wed, 2007-05-16 at 13:16 +1000, David Chinner wrote:
quoted
On Wed, May 16, 2007 at 01:33:59AM +0530, Amit K. Arora wrote:
quoted
quoted
Following changes were made to the previous version:
 1) Added description before sys_fallocate() definition.
 2) Return EINVAL for len<=0 (With new draft that Ulrich pointed to,
    posix_fallocate should return EINVAL for len <= 0.
 3) Return EOPNOTSUPP if mode is not one of FA_ALLOCATE or FA_DEALLOCATE
 4) Do not return ENODEV for dirs (let individual file systems decide if
    they want to support preallocation to directories or not.
 5) Check for wrap through zero.
 6) Update c/mtime if fallocate() succeeds.
Please don't make this always happen. c/mtime updates should be dependent
on the mode being used and whether there is visible change to the file. If no
userspace visible changes to the file occurred, then timestamps should not
be changed.
i_blocks will be updated, so it seems reasonable to update ctime.  mtime
shouldn't be changed, though, since the contents of the file will be
unchanged.
I agree. Thus the ctime should change for FA_PREALLOCATE mode also
(which does not change the file size) - if we end up having this
additional mode in near future.

--
Regards,
Amit Arora
 
quoted
e.g. FA_ALLOCATE that changes file size requires same semantics of ftruncate()
extending the file, otherwise no change in timestamps should occur.

Cheers,

Dave.
-- 
David Kleikamp
IBM Linux Technology Center
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help