WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Daniel Stodden <daniel.stodden@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] tools: build fix for blktap2
From: Christoph Egger <Christoph.Egger@xxxxxxx>
Date: Thu, 4 Feb 2010 14:05:50 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 04 Feb 2010 05:07:02 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1265287184.14885.2471.camel@xxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <201002041238.03896.Christoph.Egger@xxxxxxx> <1265287184.14885.2471.camel@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.10
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

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