[PATCH] xfsprogs: add fallocate command to xfs_io

Christoph Hellwig hch at infradead.org
Sat May 16 15:40:25 CDT 2009


On Fri, May 15, 2009 at 05:11:24PM -0500, Eric Sandeen wrote:
> Instead of above does this work better?
> 
> (just change AC_TRY_COMPILE to AC_TRY_LINK)

Yes, that correctly detects fallocate as not present for me and
thus gives a working fallocate.

> 
> AC_DEFUN([AC_HAVE_FALLOCATE],
>   [ AC_MSG_CHECKING([for fallocate])
>     AC_TRY_LINK([
> #include <linux/falloc.h>
>     ], [
>          fallocate(0, 0, 0, 0);

Why do you nee to include <linux/falloc.h> here anyway?  You don't use
any of the constants, and the fallocate libc call must be in another
headers, so it obviously compiles even without a defintion for it.




More information about the xfs mailing list