linux/fs/xfs/linux-2.6
Christoph Hellwig 2fe17c1075 fallocate should be a file operation
Currently all filesystems except XFS implement fallocate asynchronously,
while XFS forced a commit.  Both of these are suboptimal - in case of O_SYNC
I/O we really want our allocation on disk, especially for the !KEEP_SIZE
case where we actually grow the file with user-visible zeroes.  On the
other hand always commiting the transaction is a bad idea for fast-path
uses of fallocate like for example in recent Samba versions.   Given
that block allocation is a data plane operation anyway change it from
an inode operation to a file operation so that we have the file structure
available that lets us check for O_SYNC.

This also includes moving the code around for a few of the filesystems,
and remove the already unnedded S_ISDIR checks given that we only wire
up fallocate for regular files.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-01-17 02:25:31 -05:00
..
2010-12-16 16:06:07 -06:00
2010-12-16 16:05:51 -06:00
2011-01-11 20:28:29 -06:00
2011-01-11 20:28:29 -06:00
2010-10-18 15:08:06 -05:00
2011-01-11 20:28:29 -06:00
2009-09-15 12:29:24 -05:00
2008-10-30 16:55:03 +11:00
2010-10-18 15:08:04 -05:00
2011-01-11 20:28:29 -06:00
2009-12-14 23:08:16 -06:00
2010-05-21 18:31:19 -04:00