tools: build fix for blktap2
PATCH 1/1 tools: build fix for blktap2
Hi!
Attached patch makes blktap2 build again.
Signature · 6 lines
---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
tools/blktap2/drivers/tapdisk-queue.c +6 -0
@@ -284,11 +284,14 @@ struct lio {#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 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);if (err) err =__lio_setup_aio_poll (queue, qlen);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 2 lines · Christoph Egger
Hi!
Hi!
Quoted 6 lines
Attached patch makes blktap2 build again.
Signed-off-by Christoph Egger <[email protected]>#define
LIO_FLAG_EVENTFD(1<<0)
tools/blktap2/drivers/tapdisk-queue.c struct lio { · line 294
Quoted 8 lines
tools/blktap2/drivers/tapdisk-queue.c +3
-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?
tools/blktap2/drivers/tapdisk-queue.c tapdisk_lio_setup_aio(struct tqueue *que · line 383
Quoted 12 lines
static void
tapdisk_lio_destroy_aio(struct tqueue *queue)tools/blktap2/drivers/tapdisk-queue.c +3
-0@@ -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.
tools/blktap2/drivers/tapdisk-queue.c tapdisk_lio_setup_aio(struct tqueue *que · line 385
Quoted 2 lines
tools/blktap2/drivers/tapdisk-queue.c +0
-0if (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
Quoted 22 lines · On Thursday 04 February 2010 13:39:44 Daniel Stodden wrote:
Quoted 1 line · Christoph Egger
Hi!
Hi!
Quoted 6 lines
Attached patch makes blktap2 build again.
Signed-off-by Christoph Egger <[email protected]>#define
LIO_FLAG_EVENTFD(1<<0)tools/blktap2/drivers/tapdisk-queue.c struct lio { · line 294
Quoted 8 lines
tools/blktap2/drivers/tapdisk-queue.c +3
-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_VERSIONitself.
Quoted 3 lines
tapdisk_linux_versionis defined however, turning into an ENOSYS.How about just running and failing that check?
Depends on what method should be used.
Quoted 7 lines
Quoted 7 lines
static void
tapdisk_lio_destroy_aio(struct tqueue *queue)tools/blktap2/drivers/tapdisk-queue.c +0
-0@@ -372,8 +375,11 @@ tapdisk_lio_setup_aio(struct tqueue *que* if not, fall back to the poll fd patch. */
Quoted 8 lines
tools/blktap2/drivers/tapdisk-queue.c tapdisk_lio_setup_aio(struct tqueue *que · line 383
Quoted 6 lines
tools/blktap2/drivers/tapdisk-queue.c +3
-0+#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
Quoted 5 lines
tools/blktap2/drivers/tapdisk-queue.c tapdisk_lio_setup_aio(struct tqueue *que · line 385
Quoted 2 lines
tools/blktap2/drivers/tapdisk-queue.c +0
-0if (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
Signature · 6 lines
---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