diff options
author | Josef Bacik <josef@redhat.com> | 2011-01-05 15:00:07 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-01-12 20:19:03 -0500 |
commit | 924241575a85249b9d410e38f5b2fcad9035e45c (patch) | |
tree | b38b0d9998a147e2b5000d2edc5181b8b28f8cff | |
parent | 9ecf639a9686c9c7e3fd2cd72817ca490c658e6f (diff) |
fs: add documentation on fallocate hole punching
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 <josef@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | Documentation/filesystems/porting | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 07a32b42cf9c..266d2059b9b8 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -385,3 +385,12 @@ Documentation/filesystems/vfs.txt for more details. | |||
385 | on many or all directory inodes on the way down a path walk (to check for | 385 | on many or all directory inodes on the way down a path walk (to check for |
386 | exec permission). These must now be rcu-walk aware (flags & IPERM_RCU). See | 386 | exec permission). These must now be rcu-walk aware (flags & IPERM_RCU). See |
387 | Documentation/filesystems/vfs.txt for more details. | 387 | Documentation/filesystems/vfs.txt for more details. |
388 | |||
389 | -- | ||
390 | [mandatory] | ||
391 | In ->fallocate() you must check the mode option passed in. If your | ||
392 | filesystem does not support hole punching (deallocating space in the middle of a | ||
393 | file) you must return -EOPNOTSUPP if FALLOC_FL_PUNCH_HOLE is set in mode. | ||
394 | Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set, | ||
395 | so the i_size should not change when hole punching, even when puching the end of | ||
396 | a file off. | ||