[PATCH] xfsprogs: add fallocate command to xfs_io
Eric Sandeen
sandeen at sandeen.net
Sat May 16 17:08:43 CDT 2009
Christoph Hellwig wrote:
> 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.
Well, the actual patch includes it for FALLOC_FL_KEEP_SIZE so it'd be
better to detect it at config time and if not there fail?
Or we could #ifndef and have a local define ...
-Eric
More information about the xfs
mailing list