]> Git Repo - linux.git/commitdiff
fs: add documentation on fallocate hole punching
authorJosef Bacik <[email protected]>
Wed, 5 Jan 2011 20:00:07 +0000 (15:00 -0500)
committerAl Viro <[email protected]>
Thu, 13 Jan 2011 01:19:03 +0000 (20:19 -0500)
This patch simply adds documentation on how to handle the hole punching mode of
fallocate for any filesystem wishing to use it.

Signed-off-by: Josef Bacik <[email protected]>
Signed-off-by: Al Viro <[email protected]>
Documentation/filesystems/porting

index 07a32b42cf9ce364d129a57a9578907817e97727..266d2059b9b8d29a387ce2ef057fd995057542e8 100644 (file)
@@ -385,3 +385,12 @@ Documentation/filesystems/vfs.txt for more details.
 on many or all directory inodes on the way down a path walk (to check for
 exec permission). These must now be rcu-walk aware (flags & IPERM_RCU). See
 Documentation/filesystems/vfs.txt for more details.
+--
+[mandatory]
+       In ->fallocate() you must check the mode option passed in.  If your
+filesystem does not support hole punching (deallocating space in the middle of a
+file) you must return -EOPNOTSUPP if FALLOC_FL_PUNCH_HOLE is set in mode.
+Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set,
+so the i_size should not change when hole punching, even when puching the end of
+a file off.
This page took 0.054257 seconds and 4 git commands to generate.