# HG changeset patch # User Daniel Stodden # Date 1275947595 25200 # Node ID 0156cca51013424068a563705b0d5689292b5c36 # Parent 4ab68bf4c37e4c97e12efe7aced616ce6946578f blktap2: Remove tapdisk-ipc module. Obsoleted with blktapctrl. Signed-off-by: Jake Wires Signed-off-by: Daniel Stodden diff -r 4ab68bf4c37e -r 0156cca51013 tools/blktap2/drivers/Makefile --- a/tools/blktap2/drivers/Makefile Thu Jun 03 07:30:54 2010 +0100 +++ b/tools/blktap2/drivers/Makefile Mon Jun 07 14:53:15 2010 -0700 @@ -74,7 +74,6 @@ PORTABLE-OBJS-$(CONFIG_NetBSD) += blk_netbsd.o TAP-OBJS-y := scheduler.o -TAP-OBJS-y += tapdisk-ipc.o TAP-OBJS-y += tapdisk-vbd.o TAP-OBJS-y += tapdisk-image.o TAP-OBJS-y += tapdisk-driver.o diff -r 4ab68bf4c37e -r 0156cca51013 tools/blktap2/drivers/img2qcow.c --- a/tools/blktap2/drivers/img2qcow.c Thu Jun 03 07:30:54 2010 +0100 +++ b/tools/blktap2/drivers/img2qcow.c Mon Jun 07 14:53:15 2010 -0700 @@ -201,13 +201,13 @@ (uint64_t)info.size); /* Open Qcow image*/ - err = tapdisk_server_initialize(NULL, NULL); + err = tapdisk_server_initialize(); if( err ) { DPRINTF("qcow2raw Couldn't initialize server instance.\n"); return err; } - err=tapdisk_vbd_initialize(-1,-1, QCOW_VBD); + err=tapdisk_vbd_initialize(QCOW_VBD); if( err ) { DPRINTF("qcow2raw Couldn't initialize qcow vbd.\n"); return err; diff -r 4ab68bf4c37e -r 0156cca51013 tools/blktap2/drivers/qcow2raw.c --- a/tools/blktap2/drivers/qcow2raw.c Thu Jun 03 07:30:54 2010 +0100 +++ b/tools/blktap2/drivers/qcow2raw.c Mon Jun 07 14:53:15 2010 -0700 @@ -217,13 +217,13 @@ exit(-1); } - err = tapdisk_server_initialize(NULL, NULL); + err = tapdisk_server_initialize(); if( err ) { DPRINTF("qcow2raw Couldn't initialize server instance.\n"); return err; } - err=tapdisk_vbd_initialize(-1,-1, QCOW_VBD); + err=tapdisk_vbd_initialize(QCOW_VBD); if( err ) { DPRINTF("qcow2raw Couldn't initialize qcow vbd.\n"); return err; @@ -335,7 +335,7 @@ } //Now the output file should be there, reopen it as an aio VBD - err=tapdisk_vbd_initialize(-1,-1, AIO_VBD); + err=tapdisk_vbd_initialize(AIO_VBD); if( err ) { DPRINTF("qcow2raw Couldn't initialize aio vbd.\n"); return err; diff -r 4ab68bf4c37e -r 0156cca51013 tools/blktap2/drivers/tapdisk-diff.c --- a/tools/blktap2/drivers/tapdisk-diff.c Thu Jun 03 07:30:54 2010 +0100 +++ b/tools/blktap2/drivers/tapdisk-diff.c Mon Jun 07 14:53:15 2010 -0700 @@ -540,7 +540,7 @@ s->id = tapdisk_stream_count++; - err = tapdisk_vbd_initialize(-1, -1, s->id); + err = tapdisk_vbd_initialize(s->id); if (err) goto out; @@ -755,7 +755,7 @@ tapdisk_start_logging("tapdisk-diff"); - err = tapdisk_server_initialize(NULL, NULL); + err = tapdisk_server_initialize(); if (err) goto out; diff -r 4ab68bf4c37e -r 0156cca51013 tools/blktap2/drivers/tapdisk-ipc.c --- a/tools/blktap2/drivers/tapdisk-ipc.c Thu Jun 03 07:30:54 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,353 +0,0 @@ -/* - * Copyright (c) 2008, XenSource Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of XenSource Inc. nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include -#include -#include -#include -#include -#include - -#include "tapdisk.h" -#include "tapdisk-ipc.h" -#include "tapdisk-vbd.h" -#include "tapdisk-server.h" - -static void -tapdisk_ipc_read_event(event_id_t id, char mode, void *private) -{ - td_ipc_t *ipc = private; - tapdisk_ipc_read(ipc); -} - -static void -__tapdisk_ipc_init(td_ipc_t *ipc) -{ - ipc->rfd = -1; - ipc->wfd = -1; - ipc->rfd_event = -1; -} - -int -tapdisk_ipc_open(td_ipc_t *ipc, const char *read, const char *write) -{ - int err; - - memset(ipc, 0, sizeof(td_ipc_t)); - __tapdisk_ipc_init(ipc); - - if (read) { - ipc->rfd = open(read, O_RDWR | O_NONBLOCK); - if (ipc->rfd < 0) { - err = -errno; - EPRINTF("FD open failed %s: %d\n", read, err); - goto fail; - } - - ipc->rfd_event = - tapdisk_server_register_event(SCHEDULER_POLL_READ_FD, - ipc->rfd, 0, - tapdisk_ipc_read_event, - ipc); - if (ipc->rfd_event < 0) { - err = ipc->rfd_event; - goto fail; - } - } - - if (write) { - ipc->wfd = open(write, O_RDWR | O_NONBLOCK); - if (ipc->wfd < 0) { - err = -errno; - EPRINTF("FD open failed %s, %d\n", write, err); - goto fail; - } - } - - return 0; - -fail: - tapdisk_ipc_close(ipc); - return err; -} - -void -tapdisk_ipc_close(td_ipc_t *ipc) -{ - if (ipc->rfd > 0) - close(ipc->rfd); - - if (ipc->wfd > 0) - close(ipc->wfd); - - if (ipc->rfd_event >= 0) - tapdisk_server_unregister_event(ipc->rfd_event); - - __tapdisk_ipc_init(ipc); -} - -static int -tapdisk_ipc_write_message(int fd, tapdisk_message_t *message, int timeout) -{ - fd_set writefds; - int ret, len, offset; - struct timeval tv, *t; - - t = NULL; - offset = 0; - len = sizeof(tapdisk_message_t); - - if (timeout) { - tv.tv_sec = timeout; - tv.tv_usec = 0; - t = &tv; - } - - DPRINTF("sending '%s' message (uuid = %u)\n", - tapdisk_message_name(message->type), message->cookie); - - while (offset < len) { - FD_ZERO(&writefds); - FD_SET(fd, &writefds); - - /* we don't bother reinitializing tv. at worst, it will wait a - * bit more time than expected. */ - - ret = select(fd + 1, NULL, &writefds, NULL, t); - if (ret == -1) - break; - else if (FD_ISSET(fd, &writefds)) { - ret = write(fd, message + offset, len - offset); - if (ret <= 0) - break; - offset += ret; - } else - break; - } - - if (offset != len) { - EPRINTF("failure writing message\n"); - return -EIO; - } - - return 0; -} - -int -tapdisk_ipc_write(td_ipc_t *ipc, int type) -{ - tapdisk_message_t message; - - if (ipc->wfd == -1) - return 0; - - memset(&message, 0, sizeof(tapdisk_message_t)); - message.type = type; - message.cookie = ipc->uuid; - - return tapdisk_ipc_write_message(ipc->wfd, &message, 2); -} - -int -tapdisk_ipc_write_error(td_ipc_t *ipc, const char *text) -{ - tapdisk_message_t message; - - memset(&message, 0, sizeof(message)); - message.type = TAPDISK_MESSAGE_RUNTIME_ERROR; - message.cookie = ipc->uuid; - snprintf(message.u.string.text, sizeof(message.u.string.text), "%s", text); - - return tapdisk_ipc_write_message(ipc->wfd, &message, 2); -} - -static int -tapdisk_ipc_read_message(int fd, tapdisk_message_t *message, int timeout) -{ - fd_set readfds; - int ret, len, offset; - struct timeval tv, *t; - - t = NULL; - offset = 0; - len = sizeof(tapdisk_message_t); - - if (timeout) { - tv.tv_sec = timeout; - tv.tv_usec = 0; - t = &tv; - } - - memset(message, 0, sizeof(tapdisk_message_t)); - - while (offset < len) { - FD_ZERO(&readfds); - FD_SET(fd, &readfds); - - /* we don't bother reinitializing tv. at worst, it will wait a - * bit more time than expected. */ - - ret = select(fd + 1, &readfds, NULL, NULL, t); - if (ret == -1) - break; - else if (FD_ISSET(fd, &readfds)) { - ret = read(fd, message + offset, len - offset); - if (ret <= 0) - break; - offset += ret; - } else - break; - } - - if (offset != len) { - EPRINTF("failure reading message\n"); - return -EIO; - } - - DPRINTF("received '%s' message (uuid = %u)\n", - tapdisk_message_name(message->type), message->cookie); - - return 0; -} - -int -tapdisk_ipc_read(td_ipc_t *ipc) -{ - int err; - td_vbd_t *vbd; - td_uuid_t uuid; - tapdisk_message_t message; - - err = tapdisk_ipc_read_message(ipc->rfd, &message, 2); - if (err) { - tapdisk_server_check_state(); - return err; - } - - uuid = message.cookie; - vbd = tapdisk_server_get_vbd(uuid); - - if (!vbd && message.type != TAPDISK_MESSAGE_PID) { - EPRINTF("received message for non-existing vbd: %u\n", uuid); - err = -EINVAL; - goto fail; - } - - switch (message.type) { - case TAPDISK_MESSAGE_PID: - err = tapdisk_vbd_initialize(ipc->rfd, ipc->wfd, uuid); - - memset(&message, 0, sizeof(tapdisk_message_t)); - message.cookie = uuid; - - if (!err) { - message.type = TAPDISK_MESSAGE_PID_RSP; - message.u.tapdisk_pid = getpid(); - } else - message.type = TAPDISK_MESSAGE_ERROR; - - return tapdisk_ipc_write_message(ipc->wfd, &message, 0); - - case TAPDISK_MESSAGE_OPEN: - { - image_t image; - char *devname; - td_flag_t flags; - - flags = 0; - - if (message.u.params.flags & TAPDISK_MESSAGE_FLAG_RDONLY) - flags |= TD_OPEN_RDONLY; - if (message.u.params.flags & TAPDISK_MESSAGE_FLAG_SHARED) - flags |= TD_OPEN_SHAREABLE; - if (message.u.params.flags & TAPDISK_MESSAGE_FLAG_ADD_CACHE) - flags |= TD_OPEN_ADD_CACHE; - if (message.u.params.flags & TAPDISK_MESSAGE_FLAG_VHD_INDEX) - flags |= TD_OPEN_VHD_INDEX; - if (message.u.params.flags & TAPDISK_MESSAGE_FLAG_LOG_DIRTY) - flags |= TD_OPEN_LOG_DIRTY; - - err = asprintf(&devname, "%s/%s%d", - BLKTAP_DEV_DIR, BLKTAP_DEV_NAME, - message.u.params.devnum); - if (err == -1) - goto fail; - - err = tapdisk_vbd_open(vbd, - message.u.params.path, - message.drivertype, - message.u.params.storage, - devname, flags); - free(devname); - if (err) - goto fail; - - err = tapdisk_vbd_get_image_info(vbd, &image); - if (err) - goto fail; - - memset(&message, 0, sizeof(tapdisk_message_t)); - message.cookie = uuid; - message.u.image.sectors = image.size; - message.u.image.sector_size = image.secsize; - message.u.image.info = image.info; - message.type = TAPDISK_MESSAGE_OPEN_RSP; - - return tapdisk_ipc_write_message(ipc->wfd, &message, 0); - } - - case TAPDISK_MESSAGE_PAUSE: - tapdisk_vbd_pause(vbd); - return 0; /* response written asynchronously */ - - case TAPDISK_MESSAGE_RESUME: - tapdisk_vbd_resume(vbd, - message.u.params.path, - message.drivertype); - return 0; /* response written asynchronously */ - - case TAPDISK_MESSAGE_CLOSE: - tapdisk_vbd_close(vbd); - return 0; /* response written asynchronously */ - - case TAPDISK_MESSAGE_EXIT: - return 0; - } - - err = -EINVAL; - EPRINTF("received unrecognized message %s, uuid = %d\n", - tapdisk_message_name(message.type), uuid); - -fail: - memset(&message, 0, sizeof(tapdisk_message_t)); - message.cookie = uuid; - message.type = TAPDISK_MESSAGE_ERROR; - tapdisk_ipc_write_message(ipc->wfd, &message, 2); - tapdisk_server_check_state(); - - return -err; -} diff -r 4ab68bf4c37e -r 0156cca51013 tools/blktap2/drivers/tapdisk-ipc.h --- a/tools/blktap2/drivers/tapdisk-ipc.h Thu Jun 03 07:30:54 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2008, XenSource Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of XenSource Inc. nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef _TAPDISK_IPC_H_ -#define _TAPDISK_IPC_H_ - -#include "tapdisk-message.h" -#include "scheduler.h" - -typedef struct td_ipc_handle { - int rfd; - int wfd; - event_id_t rfd_event; - td_uuid_t uuid; -} td_ipc_t; - -int tapdisk_ipc_open(td_ipc_t *ipc, const char *read, const char *write); -void tapdisk_ipc_close(td_ipc_t *ipc); -int tapdisk_ipc_read(td_ipc_t *ipc); -int tapdisk_ipc_write(td_ipc_t *ipc, int type); -int tapdisk_ipc_write_error(td_ipc_t *ipc, const char *message); - -#endif diff -r 4ab68bf4c37e -r 0156cca51013 tools/blktap2/drivers/tapdisk-server.c --- a/tools/blktap2/drivers/tapdisk-server.c Thu Jun 03 07:30:54 2010 +0100 +++ b/tools/blktap2/drivers/tapdisk-server.c Mon Jun 07 14:53:15 2010 -0700 @@ -212,27 +212,6 @@ tapdisk_vbd_kill_queue(vbd); } -static void -tapdisk_server_send_error(const char *message) -{ - td_vbd_t *vbd, *tmp; - - tapdisk_server_for_each_vbd(vbd, tmp) - tapdisk_ipc_write_error(&vbd->ipc, message); -} - -static int -tapdisk_server_init_ipc(const char *read, const char *write) -{ - return tapdisk_ipc_open(&server.ipc, read, write); -} - -static void -tapdisk_server_close_ipc(void) -{ - tapdisk_ipc_close(&server.ipc); -} - static int tapdisk_server_init_aio(void) { @@ -250,7 +229,6 @@ tapdisk_server_close(void) { tapdisk_server_close_aio(); - tapdisk_server_close_ipc(); } static void @@ -292,7 +270,6 @@ if (xfsz_error_sent) break; - tapdisk_server_send_error("received SIGXFSZ, closing queues"); xfsz_error_sent = 1; break; @@ -303,7 +280,7 @@ } int -tapdisk_server_initialize(const char *read, const char *write) +tapdisk_server_initialize(void) { int err; @@ -312,21 +289,13 @@ scheduler_initialize(&server.scheduler); - err = tapdisk_server_init_ipc(read, write); - if (err) - goto fail; - err = tapdisk_server_init_aio(); if (err) - goto fail; + return err; server.run = 1; return 0; - -fail: - tapdisk_server_close_ipc(); - return err; } int diff -r 4ab68bf4c37e -r 0156cca51013 tools/blktap2/drivers/tapdisk-server.h --- a/tools/blktap2/drivers/tapdisk-server.h Thu Jun 03 07:30:54 2010 +0100 +++ b/tools/blktap2/drivers/tapdisk-server.h Mon Jun 07 14:53:15 2010 -0700 @@ -47,14 +47,13 @@ void tapdisk_server_unregister_event(event_id_t); void tapdisk_server_set_max_timeout(int); -int tapdisk_server_initialize(const char *, const char *); +int tapdisk_server_initialize(void); int tapdisk_server_run(void); #define TAPDISK_TIOCBS (TAPDISK_DATA_REQUESTS + 50) typedef struct tapdisk_server { int run; - td_ipc_t ipc; struct list_head vbds; scheduler_t scheduler; struct tqueue aio_queue; diff -r 4ab68bf4c37e -r 0156cca51013 tools/blktap2/drivers/tapdisk-stream.c --- a/tools/blktap2/drivers/tapdisk-stream.c Thu Jun 03 07:30:54 2010 +0100 +++ b/tools/blktap2/drivers/tapdisk-stream.c Mon Jun 07 14:53:15 2010 -0700 @@ -333,11 +333,11 @@ s->id = tapdisk_stream_count++; - err = tapdisk_server_initialize(NULL, NULL); + err = tapdisk_server_initialize(); if (err) goto out; - err = tapdisk_vbd_initialize(-1, -1, s->id); + err = tapdisk_vbd_initialize(s->id); if (err) goto out; diff -r 4ab68bf4c37e -r 0156cca51013 tools/blktap2/drivers/tapdisk-vbd.c --- a/tools/blktap2/drivers/tapdisk-vbd.c Thu Jun 03 07:30:54 2010 +0100 +++ b/tools/blktap2/drivers/tapdisk-vbd.c Mon Jun 07 14:53:15 2010 -0700 @@ -82,7 +82,7 @@ } int -tapdisk_vbd_initialize(int rfd, int wfd, uint16_t uuid) +tapdisk_vbd_initialize(uint16_t uuid) { int i; td_vbd_t *vbd; @@ -100,9 +100,6 @@ } vbd->uuid = uuid; - vbd->ipc.rfd = rfd; - vbd->ipc.wfd = wfd; - vbd->ipc.uuid = uuid; vbd->ring.fd = -1; /* default blktap ring completion */ @@ -995,7 +992,6 @@ vbd->kicked); tapdisk_vbd_close_vdi(vbd); - tapdisk_ipc_write(&vbd->ipc, TAPDISK_MESSAGE_CLOSE_RSP); tapdisk_vbd_unregister_events(vbd); tapdisk_vbd_unmap_device(vbd); tapdisk_server_remove_vbd(vbd); @@ -1196,7 +1192,6 @@ td_flag_clear(vbd->state, TD_VBD_PAUSE_REQUESTED); td_flag_set(vbd->state, TD_VBD_PAUSED); - tapdisk_ipc_write(&vbd->ipc, TAPDISK_MESSAGE_PAUSE_RSP); return 0; } @@ -1208,7 +1203,6 @@ if (!td_flag_test(vbd->state, TD_VBD_PAUSED)) { EPRINTF("resume request for unpaused vbd %s\n", vbd->name); - tapdisk_ipc_write(&vbd->ipc, TAPDISK_MESSAGE_ERROR); return -EINVAL; } @@ -1216,7 +1210,6 @@ vbd->name = strdup(path); if (!vbd->name) { EPRINTF("copying new vbd %s name failed\n", path); - tapdisk_ipc_write(&vbd->ipc, TAPDISK_MESSAGE_ERROR); return -EINVAL; } vbd->type = drivertype; @@ -1241,15 +1234,12 @@ sleep(TD_VBD_EIO_SLEEP); } - if (err) { - tapdisk_ipc_write(&vbd->ipc, TAPDISK_MESSAGE_ERROR); + if (err) return err; - } tapdisk_vbd_start_queue(vbd); td_flag_clear(vbd->state, TD_VBD_PAUSED); td_flag_clear(vbd->state, TD_VBD_PAUSE_REQUESTED); - tapdisk_ipc_write(&vbd->ipc, TAPDISK_MESSAGE_RESUME_RSP); return 0; } diff -r 4ab68bf4c37e -r 0156cca51013 tools/blktap2/drivers/tapdisk-vbd.h --- a/tools/blktap2/drivers/tapdisk-vbd.h Thu Jun 03 07:30:54 2010 +0100 +++ b/tools/blktap2/drivers/tapdisk-vbd.h Mon Jun 07 14:53:15 2010 -0700 @@ -34,7 +34,6 @@ #include "tapdisk.h" #include "scheduler.h" -#include "tapdisk-ipc.h" #include "tapdisk-image.h" #define TD_VBD_MAX_RETRIES 100 @@ -101,8 +100,6 @@ td_flag_t flags; td_flag_t state; - td_ipc_t ipc; - struct list_head images; struct list_head new_requests; @@ -171,7 +168,7 @@ return list_entry(image->next.next, td_image_t, next); } -int tapdisk_vbd_initialize(int, int, td_uuid_t); +int tapdisk_vbd_initialize(td_uuid_t); void tapdisk_vbd_set_callback(td_vbd_t *, td_vbd_cb_t, void *); int tapdisk_vbd_parse_stack(td_vbd_t *vbd, const char *path); int tapdisk_vbd_open(td_vbd_t *, const char *, uint16_t, diff -r 4ab68bf4c37e -r 0156cca51013 tools/blktap2/drivers/tapdisk2.c --- a/tools/blktap2/drivers/tapdisk2.c Thu Jun 03 07:30:54 2010 +0100 +++ b/tools/blktap2/drivers/tapdisk2.c Mon Jun 07 14:53:15 2010 -0700 @@ -249,7 +249,7 @@ char *devname; struct blktap2_params params; - err = tapdisk_vbd_initialize(-1, -1, TAPDISK2_VBD); + err = tapdisk_vbd_initialize(TAPDISK2_VBD); if (err) return err; @@ -349,7 +349,7 @@ if (err) goto out; - err = tapdisk_server_initialize(NULL, NULL); + err = tapdisk_server_initialize(); if (err) goto fail;