mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
3c5645fab3
commit
7e7f4a0efc
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue