From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXt9D-0006xb-DO for qemu-devel@nongnu.org; Mon, 12 Nov 2012 07:29:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXt9A-0005Bm-4A for qemu-devel@nongnu.org; Mon, 12 Nov 2012 07:29:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXt99-0005Bh-Sl for qemu-devel@nongnu.org; Mon, 12 Nov 2012 07:29:48 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qACCTlte008362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 12 Nov 2012 07:29:47 -0500 Message-ID: <50A0EBB9.3050907@redhat.com> Date: Mon, 12 Nov 2012 13:29:45 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1352723015-13007-1-git-send-email-kwolf@redhat.com> In-Reply-To: <1352723015-13007-1-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qemu-nbd: Initialise main loop earlier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-devel Il 12/11/2012 13:23, Kevin Wolf ha scritto: > Since the latest AIO changes qemu-nbd would segfault because > bdrv_init() requires qemu_aio_context to be initialised. Thanks... I had this in my NBD queue, going to send it out later. Paolo > Signed-off-by: Kevin Wolf > --- > qemu-nbd.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/qemu-nbd.c b/qemu-nbd.c > index 15bcd08..80f08d8 100644 > --- a/qemu-nbd.c > +++ b/qemu-nbd.c > @@ -539,6 +539,7 @@ int main(int argc, char **argv) > snprintf(sockpath, 128, SOCKET_PATH, basename(device)); > } > > + qemu_init_main_loop(); > bdrv_init(); > atexit(bdrv_close_all); > > @@ -584,7 +585,6 @@ int main(int argc, char **argv) > memset(&client_thread, 0, sizeof(client_thread)); > } > > - qemu_init_main_loop(); > qemu_set_fd_handler2(fd, nbd_can_accept, nbd_accept, NULL, > (void *)(uintptr_t)fd); > >