mirror_zfs/config
Etienne Dechamps bbdc6ae495 Add interface for file hole punching.
This adds an interface to "punch holes" (deallocate space) in VFS
files. The interface is identical to the Solaris VOP_SPACE interface.
This interface is necessary for TRIM support on file vdevs.

This is implemented using Linux fallocate(FALLOC_FL_PUNCH_HOLE), which
was introduced in 2.6.38. For a brief time before 2.6.38 this was done
using the truncate_range inode operation, which was quickly deprecated.
This patch only supports FALLOC_FL_PUNCH_HOLE.

This adds support for the truncate_range() inode operation to
VOP_SPACE() for file hole punching. This API is deprecated and removed
in 3.5, so it's only useful for old kernels.

On tmpfs, the truncate_range() inode operation translates to
shmem_truncate_range(). Unfortunately, this function expects the end
offset to be inclusive and aligned to the end of a page. If it is not,
the kernel will stop with a BUG_ON().

This patch fixes the issue by adapting to the constraints set forth by
shmem_truncate_range().

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #168
2012-10-04 16:22:07 -07:00
..
.gitignore Remove autotools products 2012-08-27 11:46:23 -07:00
arch.am Don't build packages that haven't been selected. 2012-07-26 14:54:32 -07:00
config.awk Allow spl_config.h to be included by dependant packages (updated) 2010-03-22 14:45:33 -07:00
deb.am Don't build packages that haven't been selected. 2012-07-26 14:54:32 -07:00
rpm.am Support building a spl-modules-dkms sub package 2012-08-08 13:49:40 -07:00
Rules.am Support custom build directories 2010-09-05 21:49:05 -07:00
spl-build.m4 Add interface for file hole punching. 2012-10-04 16:22:07 -07:00
spl-meta.m4 Public Release Prep 2010-05-17 15:18:00 -07:00
tgz.am Don't build packages that haven't been selected. 2012-07-26 14:54:32 -07:00