[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 05/15] blockjob: Fix coroutine thread after AioContex
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 05/15] blockjob: Fix coroutine thread after AioContext change |
Date: |
Fri, 10 May 2019 18:16:04 +0200 |
Commit 463e0be10 ('blockjob: add AioContext attached callback') tried to
make block jobs robust against AioContext changes of their main node,
but it never made sure that the job coroutine actually runs in the new
thread.
Instead of waking up the job coroutine in whatever thread it ran before,
let's always pass the AioContext where it should be running now.
Signed-off-by: Kevin Wolf <address@hidden>
---
job.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/job.c b/job.c
index da8e4b7bf2..2167d53717 100644
--- a/job.c
+++ b/job.c
@@ -432,7 +432,7 @@ void job_enter_cond(Job *job, bool(*fn)(Job *job))
timer_del(&job->sleep_timer);
job->busy = true;
job_unlock();
- aio_co_wake(job->co);
+ aio_co_enter(job->aio_context, job->co);
}
void job_enter(Job *job)
--
2.20.1
- [Qemu-block] [PULL 00/15] Block layer patches, Kevin Wolf, 2019/05/10
- [Qemu-block] [PULL 01/15] block: remove bs from lists before closing, Kevin Wolf, 2019/05/10
- [Qemu-block] [PULL 02/15] MAINTAINERS: Downgrade status of block sections without "M:" to "Odd Fixes", Kevin Wolf, 2019/05/10
- [Qemu-block] [PULL 03/15] MAINTAINERS: Add an entry for the Parallel NOR Flash devices, Kevin Wolf, 2019/05/10
- [Qemu-block] [PULL 04/15] qemu-iotests: Fix cleanup for 192, Kevin Wolf, 2019/05/10
- [Qemu-block] [PULL 05/15] blockjob: Fix coroutine thread after AioContext change,
Kevin Wolf <=
- [Qemu-block] [PULL 06/15] test-block-iothread: Job coroutine thread after AioContext switch, Kevin Wolf, 2019/05/10
- [Qemu-block] [PULL 08/15] qcow2: Replace bdrv_write() with bdrv_pwrite(), Kevin Wolf, 2019/05/10
- [Qemu-block] [PULL 07/15] qemu-img: Use IEC binary prefixes for size constants, Kevin Wolf, 2019/05/10
- [Qemu-block] [PULL 09/15] vdi: Replace bdrv_{read, write}() with bdrv_{pread, pwrite}(), Kevin Wolf, 2019/05/10
- [Qemu-block] [PULL 10/15] vvfat: Replace bdrv_{read, write}() with bdrv_{pread, pwrite}(), Kevin Wolf, 2019/05/10
- [Qemu-block] [PULL 11/15] block: Remove bdrv_read() and bdrv_write(), Kevin Wolf, 2019/05/10
- [Qemu-block] [PULL 12/15] qcow2: Remove BDRVQcow2State.cluster_sectors, Kevin Wolf, 2019/05/10
- [Qemu-block] [PULL 14/15] qemu-img: Use zero writes after source backing EOF, Kevin Wolf, 2019/05/10
- [Qemu-block] [PULL 13/15] qemu-img: Allow rebase with no input base, Kevin Wolf, 2019/05/10