]> git.proxmox.com Git - mirror_spl.git/commit - config/spl-build.m4
RHEL 6.4 compat, fallocate()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 8 Jan 2013 17:42:49 +0000 (09:42 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 8 Jan 2013 17:53:13 +0000 (09:53 -0800)
commit1c7b3eaf87492e875d7ad05f183e98fa306e48c2
tree363ffca3d6ce6c1ca4e09d44fd60d04cdc22667c
parent46a75aadb7c08085a4ad2e55dcf5b6fb387c1253
RHEL 6.4 compat, fallocate()

In the upstream kernel the FALLOC_FL_PUNCH_HOLE #define was
introduced after the fallocate() function was moved from the
inode_operations to the file_operations structure.  Therefore,
the SPL code assumed that if FALLOC_FL_PUNCH_HOLE was defined
it was safe to use f_ops->fallocate().

Unfortunately, the RHEL6.4 kernel has only backported the
FALLOC_FL_PUNCH_HOLE #define and not the fallocate() change.

To address this compatibility issue the spl_filp_fallocate()
helper function was added to properly detect which interface
is available.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
config/spl-build.m4
include/linux/file_compat.h
module/spl/spl-vnode.c