include/block/aio.h | 3 +++ qemu-img.c | 4 ++++ util/async.c | 5 +---- 3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/include/block/aio.h b/include/block/aio.h index e9bc04c..9153d87 100644 --- a/include/block/aio.h +++ b/include/block/aio.h @@ -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;
diff --git a/qemu-img.c b/qemu-img.c index 60a2be3..cf037aa 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -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: diff --git a/util/async.c b/util/async.c index 042bf8a..af235fc 100644 --- a/util/async.c +++ b/util/async.c @@ -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 } }
Can you try this aboving patchset to slove it?
include/ block/aio. h | 3 +++
qemu-img.c | 4 ++++
util/async.c | 5 +----
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/include/ block/aio. h b/include/ block/aio. h block/aio. h block/aio. h
index e9bc04c..9153d87 100644
--- a/include/
+++ b/include/
@@ -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;
diff --git a/qemu-img.c b/qemu-img.c
.wr_in_ order = wr_in_order,
.num_ coroutines = num_coroutines, aio_context( ); for_convert = 1; do_copy( &state) ;
index 60a2be3..cf037aa 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -2411,6 +2411,10 @@ static int img_convert(int argc, char **argv)
};
+
+ AioContext *ctx = qemu_get_
+ ctx->notify_
+
ret = convert_
out: AioContext *ctx) for_convert) {
event_ notifier_ set(&ctx- >notifier) ;
atomic_ mb_set( &ctx->notified, true); __aarch64_ _)
diff --git a/util/async.c b/util/async.c
index 042bf8a..af235fc 100644
--- a/util/async.c
+++ b/util/async.c
@@ -336,12 +336,9 @@ void aio_notify(
* 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_
-#if defined(
- kill(getpid(), SIGIO);
-#endif
}
}
Can you try this aboving patchset to slove it?