From: Daniel Stodden Subject: Re: [PATCH] tools: build fix for blktap2 Date: Thu, 4 Feb 2010 04:39:44 -0800 Message-ID: <1265287184.14885.2471.camel@agari.van.xensource.com> References: <201002041238.03896.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <201002041238.03896.Christoph.Egger@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Christoph Egger Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org 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 > #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? > 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. > 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? Cheers, Daniel