xfs
[Top] [All Lists]

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

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH 2/2] xfs_io: configure tests for preadv/pwritev & sync_file_range
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 10 Oct 2012 09:56:20 +1100
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <5074A5FE.50101@xxxxxxxxxxx>
References: <50749EE2.6070408@xxxxxxxxxx> <5074A05A.6000709@xxxxxxxxxxx> <20121009222806.GS23644@dastard> <5074A5FE.50101@xxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Oct 09, 2012 at 05:32:30PM -0500, Eric Sandeen wrote:
> 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

True.

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

Unlikely ;)

> Could change it to HAVE_PREADWRITEV or something ...

HAVE_VECTORED_IO?

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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