RFC block: Synchronous bdrv_*() from coroutine in different AioContext
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 22 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | block: Factor out bdrv_run_co()block/ | +28 | 3 replies | |
| 2/3 | block: Allow bdrv_run_co() from different AioContextblock/ | +14 | 6 replies | |
| 3/3 | block: Assert we're running in the right threadblock/ | +4 | 3 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Eric Blake | Philippe Mathieu-Daudé |
|---|---|---|
| 1/3 | R-b | R-b |
| 2/3 | ||
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH 0/3] block: Synchronous bdrv_*() from coroutine in different AioContext
Stefan (Reiter), after looking a bit closer at this, I think there is no bug in QEMU, but the bug is in your coroutine code that calls block layer functions without moving into the right AioContext first. I've written this series anyway as it potentially makes the life of callers easier and would probably make your buggy code correct.
However, it doesn't feel right to commit something like patch 2 without having a user for it. Is there a reason why you can't upstream your async snapshot code?
The series would also happen fix a bug in my recent patch to convert qmp_block_resize() to coroutines, but I feel it's not how I would naturally fix it. Switching the thread already in the QMP handler before calling bdrv_truncate() would feel more appropriate. I wonder if it wouldn't actually be the same for your snapshot code.
Kevin Wolf (3):
block: Factor out bdrv_run_co()
block: Allow bdrv_run_co() from different AioContext
block: Assert we're running in the right thread
block/io.c | 122 ++++++++++++++++++++--------------------------------- 1 file changed, 45 insertions(+), 77 deletions(-)
Signature · 1 line
2.25.3