@@ -89,6 +89,9 @@ struct AioContext {
*/
uint32_t notify_me;
+ /* force to notify for qemu-img convert */
+ bool notify_for_convert;
+
/* lock to protect between bh's adders and deleter */
QemuMutex bh_lock;
@@ -2411,6 +2411,10 @@ static int img_convert(int argc, char **argv)
.wr_in_order = wr_in_order,
.num_coroutines = num_coroutines,
};
+
+ AioContext *ctx = qemu_get_aio_context();
+ ctx->notify_for_convert = 1;
+
ret = convert_do_copy(&state);
out:
@@ -336,12 +336,9 @@ void aio_notify(AioContext *ctx)
* with atomic_or in aio_ctx_prepare or atomic_add in aio_poll.
*/
smp_mb();
- if (ctx->notify_me) {
+ if (ctx->notify_me || ctx->notify_for_convert) {
event_notifier_set(&ctx->notifier);
atomic_mb_set(&ctx->notified, true);
-#if defined(__aarch64__)
- kill(getpid(), SIGIO);
-#endif
}
}