From: Kevin Wolf <kwolf@redhat.com>
To: pbonzini@redhat.com
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] qemu-nbd: Initialise main loop earlier
Date: Mon, 12 Nov 2012 13:23:35 +0100 [thread overview]
Message-ID: <1352723015-13007-1-git-send-email-kwolf@redhat.com> (raw)
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
next reply other threads:[~2012-11-12 12:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-12 12:23 Kevin Wolf [this message]
2012-11-12 12:29 ` [Qemu-devel] [PATCH] qemu-nbd: Initialise main loop earlier Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1352723015-13007-1-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).