xfs
[Top] [All Lists]

Re: [PATCH 2/2] xfs_io: configure tests for preadv/pwritev & sync_file_r

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/2] xfs_io: configure tests for preadv/pwritev & sync_file_range
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Tue, 09 Oct 2012 17:32:30 -0500
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <20121009222806.GS23644@dastard>
References: <50749EE2.6070408@xxxxxxxxxx> <5074A05A.6000709@xxxxxxxxxxx> <20121009222806.GS23644@dastard>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:15.0) Gecko/20120907 Thunderbird/15.0.1
On 10/9/12 5:28 PM, Dave Chinner wrote:
> On Tue, Oct 09, 2012 at 05:08:26PM -0500, Eric Sandeen wrote:
>> On older systems we may not have preadv/pwritev and/or
>> sync_file_range.
>>
>> Add the configure magic, and stub out the code
>> where needed.
>>
>> (sync_file_range just needed a better test; preadv/pwritev
>> took a little more rearranging)
>>
>> And fix a couple typos ("numberic") while we're at it.
>>
>> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> 
> Looks fine, though the "HAVE_PREADV" in the pwritev case is a bit
> wierd. Perhaps doing this:
> 
>> diff --git a/include/builddefs.in b/include/builddefs.in
>> index 81ebfcd..4a0e910 100644
>> --- a/include/builddefs.in
>> +++ b/include/builddefs.in
>> @@ -101,6 +101,8 @@ HAVE_GETMNTENT = @have_getmntent@
>>  HAVE_GETMNTINFO = @have_getmntinfo@
>>  HAVE_FALLOCATE = @have_fallocate@
>>  HAVE_FIEMAP = @have_fiemap@
>> +HAVE_PREADV = @have_preadv@
> 
> HAVE_PWRITEV = @have_preadv@
> 
> Would reduce that wierdness a bit when looking at the pwritev
> code....

Yeah I was a little unhappy w/ that.  But I think then we'd also need:

+ifeq ($(HAVE_PWRITEV),yes)
+LCFLAGS += -DHAVE_PWRITEV
+endif

and at some point we might run out of room on the cmdline ;)

Could change it to HAVE_PREADWRITEV or something ...

-Eric

> Otherwise everything else looks ok.
> 
> Cheers,
> 
> Dave.
> 

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