qemu-img: wait for convert coroutines to complete
PATCH 1/1 qemu-img: wait for convert coroutines to complete
From: Anton Nefedov <[email protected]>
We should wait for other coroutines on error path, i.e. one of coroutines terminates with i/o error, before cleaning the common structures. In the other case we would crash in a lot of different places. This behaviour was introduced by commit 2d9187bc65.
--- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-img.c +1 -1
@@ -1899,7 +1899,7 @@ static int convert_do_copy(ImgConvertState *s)qemu_coroutine_enter (s->co[i]); } -while (s->ret == -EINPROGRESS ) { +while (s->running_coroutines) {main_loop_wait (false); }
Signature · 1 line
2.7.4
Am 18.04.2017 um 12:27 schrieb Denis V. Lunev:
Quoted 21 lines
From: Anton Nefedov <[email protected]>
We should wait for other coroutines on error path, i.e. one of coroutines terminates with i/o error, before cleaning the common structures. In the other case we would crash in a lot of different places. This behaviour was introduced by commit
2d9187bc65.Signed-off-by Anton Nefedov <[email protected]>Signed-off-by Denis V. Lunev <[email protected]>CC Peter Lieven <[email protected]>CC Kevin Wolf <[email protected]>CC Max Reitz <[email protected]>--- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)qemu-img.c +0
-0
qemu-img.c static int convert_do_copy(ImgConvertState *s) · line 1905
Quoted 8 lines
qemu-img.c +1
-1@@ -1899,7 +1899,7 @@ static int convert_do_copy(ImgConvertState *s)qemu_coroutine_enter (s->co[i]); } -while (s->ret == -EINPROGRESS ) { +while (s->running_coroutines) {main_loop_wait (false); }
Thanks for catching this.
Peter
Am 18.04.2017 um 12:27 schrieb Denis V. Lunev:
Quoted 7 lines
From: Anton Nefedov <[email protected]>
We should wait for other coroutines on error path, i.e. one of coroutines terminates with i/o error, before cleaning the common structures. In the other case we would crash in a lot of different places. This behaviour was introduced by commit
2d9187bc65.
Quoted 5 lines
Signed-off-by Anton Nefedov <[email protected]>Signed-off-by Denis V. Lunev <[email protected]>CC Peter Lieven <[email protected]>CC Kevin Wolf <[email protected]>CC Max Reitz <[email protected]>
This should go into 2.9.1
Peter
Quoted 14 lines · Peter Lieven
Am 18.04.2017 um 12:27 schrieb Denis V. Lunev:
Quoted 7 lines
From: Anton Nefedov <[email protected]>
We should wait for other coroutines on error path, i.e. one of coroutines terminates with i/o error, before cleaning the common structures. In the other case we would crash in a lot of different places. This behaviour was introduced by commit
2d9187bc65.Quoted 5 lines
Signed-off-by Anton Nefedov <[email protected]>Signed-off-by Denis V. Lunev <[email protected]>CC Peter Lieven <[email protected]>CC Kevin Wolf <[email protected]>CC Max Reitz <[email protected]>
Quoted 6 lines
This should go into 2.9.1
Peter
Actually I'm afraid the patch is incorrect.. The erroneous coroutine bails out without reentering its possible dependent coroutine so it (and the following dependents) will never finish.
I'll send out the 2nd version soon
/Anton