block/mirror: Always call block_job_sleep_ns()
PATCH 1/1 block/mirror: Always call block_job_sleep_ns()
The mirror block job is trying to take a clever shortcut if delay_ns is 0 and skips block_job_sleep_ns() in that case. But that function must be called in every block job iteration, because otherwise it is for example impossible to pause the job.
---
This makes test 129 pass when run in tmpfs (for me, at least).
--- block/mirror.c | 3 --- 1 file changed, 3 deletions(-)
block/mirror.c +0 -3
@@ -482,9 +482,6 @@ static void coroutine_fn mirror_run(void *opaque)continue ; }else if (cnt !=0 ) { delay_ns =mirror_iteration (s); -if (delay_ns ==0 ) { -continue ; - } } }
Signature · 1 line
2.3.5
Quoted 8 lines · Max Reitz
The mirror block job is trying to take a clever shortcut if
delay_nsis 0 and skipsblock_job_sleep_ns()in that case. But that function must be called in every block job iteration, because otherwise it is for example impossible to pause the job.Signed-off-by Max Reitz <[email protected]>---
This makes test 129 pass when run in tmpfs (for me, at least).
Quoted 8 lines · Max Reitz
The mirror block job is trying to take a clever shortcut if
delay_nsis 0 and skipsblock_job_sleep_ns()in that case. But that function must be called in every block job iteration, because otherwise it is for example impossible to pause the job.Signed-off-by Max Reitz <[email protected]>---
This makes test 129 pass when run in tmpfs (for me, at least).
Looks good to me. Thanks for debugging the failure!
Quoted 21 lines
--- block/mirror.c | 3 --- 1 file changed, 3 deletions(-)block/mirror.c +0
-3@@ -482,9 +482,6 @@ static void coroutine_fn mirror_run(void *opaque)continue ; }else if (cnt !=0 ) { delay_ns =mirror_iteration (s); -if (delay_ns ==0 ) { -continue ; - } } }Signature · 1 line
2.3.5
Kevin Wolf
AppliedAm 27.04.2015 um 13:07 hat Max Reitz geschrieben:
Quoted 8 lines
The mirror block job is trying to take a clever shortcut if
delay_nsis 0 and skipsblock_job_sleep_ns()in that case. But that function must be called in every block job iteration, because otherwise it is for example impossible to pause the job.Signed-off-by Max Reitz <[email protected]>---
This makes test 129 pass when run in tmpfs (for me, at least).
Thanks, applied to the block branch.
Kevin