提交 7e7f4a0e 编写于 作者: P Paolo Bonzini

qemu-nbd: initialize main loop before block layer

qemu-nbd was broken because they initialized the block layer while
qemu_aio_context was still NULL.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 3c5645fa
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册