On Tuesday 08 January 2008 08:25:07 Jeff Moyer wrote:
> Rusty Russell <[EMAIL PROTECTED]> writes:
> > I recently tried to use libaio (0.3.106), and discovered it didn't have
> > eventfd support.  Or preadv/pwritev support.  And the testsuite didn't
> > compile.  Or work.
> >
> > Anyway, it's shipped by the distros, so I figure it's worth patching.
> > I'm cc'ing Ben in the hope he's still maintaining it.  If not I'll
> > find a home somewhere for it.
>
> Thanks for doing this, Rusty.  I have a few comments below.

Thanks Jeff, I was wondering if I'd sent it into the void...

> > diff -ur libaio-0.3.106/ChangeLog libaio-0.3.106-aio_abi/ChangeLog
> > --- libaio-0.3.106/ChangeLog        2002-10-01 08:09:56.000000000 +1000
> > +++ libaio-0.3.106-aio_abi/ChangeLog        2008-01-03 17:48:48.000000000 
> > +1100
> > @@ -1,3 +1,14 @@
> > +rusty-v1
> > +   - Make tests compile again on modern systems (warnings + -Werror)
> > +   - Add 'make partcheck' and don't require manual setup for testing.
> > +   - Change test harness to compile against this dir, not global install
> > +   - Fix 5.t for archs where PROT_WRITE mappings are readable.
> > +   - Allow sending of SIGXFSZ on aio over limits
> > +   - Explicitly specify bash for runtests.sh
> > +   - Remove (never-merged?) io_prep_poll
>
> Well, I believe this was supported in Red Hat AS2.1 and RHEL 3.

Ah, OK.  It's not in mainline (only checked back to 2.6.12-rc2 tho).  I'll put 
them back with a comment to that effect...

> >     assert(buf != (char *)-1);
> >
> >     status |= attempt_rw(rwfd, buf, SIZE,  0,  READ, SIZE);
> > -   status |= attempt_rw(rwfd, buf, SIZE,  0, WRITE, -EFAULT);
> > +
> > +   /* Whether PROT_WRITE is readable is arch-dependent.  So compare
> > +    * against pread result. */
> > +   res = write(rwfd, buf, SIZE);
> > +   if (res < 0)
> > +           res = -errno;
> > +   status |= attempt_rw(rwfd, buf, SIZE,  0, WRITE, res);
>
> Am I missing something, or does the code change do the opposite of
> what your comment suggests?

Err, yeah.  Works on x86 of course, but it's wrong.

> >  long long get_fs_limit(int fd)
> >  {
> > -   struct statfs s;
> > -   int res;
> > -   long long lim = 0;
> > -
> > -   res = fstatfs(fd, &s);          assert(res == 0);
> > +   long long min = 0, max = 100000000000000ULL;
> > +   char c = 0;
>
> How did you choose this upper bound?

Added a few zeroes to the previous one 8).  It's so fast I might as well 
choose 18446744073709551615LL.

Will update and re-send, this time cc'ing the linux-aio list.

Thanks,
Rusty.

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss

Reply via email to