qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-nbd: Initialise main loop earlier
@ 2012-11-12 12:23 Kevin Wolf
  2012-11-12 12:29 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Wolf @ 2012-11-12 12:23 UTC (permalink / raw)
  To: pbonzini; +Cc: kwolf, qemu-devel

Since the latest AIO changes qemu-nbd would segfault because
bdrv_init() requires qemu_aio_context to be initialised.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 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);
 
-- 
1.7.6.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu-nbd: Initialise main loop earlier
  2012-11-12 12:23 [Qemu-devel] [PATCH] qemu-nbd: Initialise main loop earlier Kevin Wolf
@ 2012-11-12 12:29 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2012-11-12 12:29 UTC (permalink / raw)
  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 <kwolf@redhat.com>
> ---
>  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);
>  
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-12 12:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-12 12:23 [Qemu-devel] [PATCH] qemu-nbd: Initialise main loop earlier Kevin Wolf
2012-11-12 12:29 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).