[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] tools: build fix for blktap2



On Thursday 04 February 2010 13:39:44 Daniel Stodden wrote:
> On Thu, 2010-02-04 at 06:38 -0500, Christoph Egger wrote:
> > Hi!
>
> Hi!
>
> > Attached patch makes blktap2 build again.
> >
> > Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
> >
> >  #define LIO_FLAG_EVENTFD        (1<<0)
> >
> > +#if defined(__linux__)
> > +/* XXX abstraction violation: move this into a linux specific file */
> >  static int
> >  tapdisk_lio_check_resfd(void)
> >  {
> >         return tapdisk_linux_version() >= KERNEL_VERSION(2, 6, 22);
> >  }
> > +#endif
>
> Ah right, I forgot to mask out KERNEL_VERSION itself.
>
> tapdisk_linux_version is defined however, turning into an ENOSYS.
>
> How about just running and failing that check?

Depends on what method should be used.

>
> >  static void
> >  tapdisk_lio_destroy_aio(struct tqueue *queue)
> > @@ -372,8 +375,11 @@ tapdisk_lio_setup_aio(struct tqueue *que
> >          * if not, fall back to the poll fd patch.
> >          */
> >
> > +#if defined(__linux__)
> > +/* XXX abstraction violation: move this into a linux specific file */
> >         err = !tapdisk_lio_check_resfd();
> >         if (!err)
> > +#endif
> >                 err = __lio_setup_aio_eventfd(queue, qlen);
>
> I don't think you wanted this, unless you're sure what you keep calling.

Is the Linux event comparable to this?
http://netbsd.gw.com/cgi-bin/man-cgi?event++NetBSD-current

> >         if (err)
> >                 err = __lio_setup_aio_poll(queue, qlen);
>
> Just to understand the FreeBSD situation a little better -- it actually
> does come with a mechanism equivalent to the poll patch?

NetBSD supports POSIX AIO and has poll(2).
http://netbsd.gw.com/cgi-bin/man-cgi?poll++NetBSD-current

Christoph


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.