xfs
[Top] [All Lists]

Re: [PATCH] xfsprogs: add fallocate command to xfs_io

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfsprogs: add fallocate command to xfs_io
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Sat, 16 May 2009 17:08:43 -0500
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <20090516204025.GC28186@xxxxxxxxxxxxx>
References: <4A077195.3070708@xxxxxxxxxxx> <20090515171324.GA14804@xxxxxxxxxxxxx> <20090515172711.GA23630@xxxxxxxxxxxxx> <4A0DB97F.4020201@xxxxxxxxxxx> <4A0DE88C.2040401@xxxxxxxxxxx> <20090516204025.GC28186@xxxxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)
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

<Prev in Thread] Current Thread [Next in Thread>