[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qemu-nbd: Initialise main loop earlier
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] qemu-nbd: Initialise main loop earlier |
Date: |
Mon, 12 Nov 2012 13:29:45 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 |
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 <address@hidden>
> ---
> 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);
>
>