Fix fallocate erroneously returning ENOSYS on Linux systems
authorWade Cline <wcline@us.ibm.com>
Wed, 1 Aug 2012 06:45:48 +0000 (08:45 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 1 Aug 2012 06:45:48 +0000 (08:45 +0200)
commitbcb01f840c244851f760e5ea3bb0fe9aa1c03188
treeeb740e3f0eddf7101999afd19761b655c1dee76b
parentfb9f08c6b9da943efd334187ac74200e551596f2
Fix fallocate erroneously returning ENOSYS on Linux systems

Currently, the helpers.c file provides a function defintion for Linux
fallocate that sets errno to ENOSYS and returns failure; this is useful
for a non-Linux OS. However, this definition will override the Linux
implementation of fallocate when 'fallocate=keep' is set. Adding a
preprocessor macro to check if Linux fallocate is defined fixes this
issue.

Signed-off-by: Wade Cline <wcline@us.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
helpers.c