Commit ad02ad6fda4499fdf71c82ea1c7f37fbea25985d
1 parent
e5fd43a9
Do not allow AIO to be inited multiple times
This prevents two signalfd() threads from being spawned. This problem was originally spotted by Blue Swirl. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5289 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
0 deletions
block-raw-posix.c
@@ -511,6 +511,9 @@ void qemu_aio_init(void) | @@ -511,6 +511,9 @@ void qemu_aio_init(void) | ||
511 | { | 511 | { |
512 | sigset_t mask; | 512 | sigset_t mask; |
513 | 513 | ||
514 | + if (aio_initialized) | ||
515 | + return; | ||
516 | + | ||
514 | aio_initialized = 1; | 517 | aio_initialized = 1; |
515 | 518 | ||
516 | /* Make sure to block AIO signal */ | 519 | /* Make sure to block AIO signal */ |