block: keep bitmap if incremental backup job is cancelled
PATCH 1/1 block: keep bitmap if incremental backup job is cancelled
Reclaim the dirty bitmap if an incremental backup block job is cancelled. The ret variable may be 0 when the job is cancelled so it's not enough to check ret < 0.
--- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/backup.c +1 -1
@@ -431,7 +431,7 @@ static void coroutine_fn backup_run(void *opaque)if (job->sync_bitmap) {BdrvDirtyBitmap *bm; -if (ret <0 ) { +if (ret <0 ||block_job_is_cancelled (&job->common)) {/* Merge the successor back into the parent, delete nothing. */ bm =bdrv_reclaim_dirty_bitmap (bs, job->sync_bitmap,NULL );assert (bm);
Signature · 1 line
2.4.3
Quoted 17 lines · Stefan Hajnoczi
Reclaim the dirty bitmap if an incremental backup block job is cancelled. The ret variable may be 0 when the job is cancelled so it's not enough to check ret < 0.
Reviewed-by John Snow <[email protected]>Reviewed-by Max Reitz <[email protected]>Signed-off-by Stefan Hajnoczi <[email protected]>--- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)block/backup.c +0
-0
block/backup.c static void coroutine_fn backup_run(void *opaque) · line 437
Quoted 8 lines
block/backup.c +1
-1@@ -431,7 +431,7 @@ static void coroutine_fn backup_run(void *opaque)if (job->sync_bitmap) {BdrvDirtyBitmap *bm; -if (ret <0 ) { +if (ret <0 ||block_job_is_cancelled (&job->common)) {/* Merge the successor back into the parent, delete nothing. */ bm =bdrv_reclaim_dirty_bitmap (bs, job->sync_bitmap,NULL );assert (bm);
Didn't Jeff Cody already stage this?
Quoted 20 lines · John Snow
Quoted 17 lines · Stefan Hajnoczi
Reclaim the dirty bitmap if an incremental backup block job is cancelled. The ret variable may be 0 when the job is cancelled so it's not enough to check ret < 0.
Reviewed-by John Snow <[email protected]>Reviewed-by Max Reitz <[email protected]>Signed-off-by Stefan Hajnoczi <[email protected]>--- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)block/backup.c +0
-0@@ -431,7 +431,7 @@ static void coroutine_fn backup_run(void *opaque)
Quoted 10 lines
block/backup.c static void coroutine_fn backup_run(void *opaque) · line 437
Quoted 8 lines
block/backup.c +1
-1if (job->sync_bitmap) {BdrvDirtyBitmap *bm; -if (ret <0 ) { +if (ret <0 ||block_job_is_cancelled (&job->common)) {/* Merge the successor back into the parent, delete nothing. */ bm =bdrv_reclaim_dirty_bitmap (bs, job->sync_bitmap,NULL );assert (bm);Didn't Jeff Cody already stage this?
Yes
Quoted 32 lines · Jeff Cody
Quoted 20 lines · John Snow
Quoted 17 lines · Stefan Hajnoczi
Reclaim the dirty bitmap if an incremental backup block job is cancelled. The ret variable may be 0 when the job is cancelled so it's not enough to check ret < 0.
Reviewed-by John Snow <[email protected]>Reviewed-by Max Reitz <[email protected]>Signed-off-by Stefan Hajnoczi <[email protected]>--- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)block/backup.c +0
-0@@ -431,7 +431,7 @@ static void coroutine_fn backup_run(void *opaque)Quoted 10 lines
block/backup.c static void coroutine_fn backup_run(void *opaque) · line 437
Quoted 8 lines
block/backup.c +1
-1if (job->sync_bitmap) {BdrvDirtyBitmap *bm; -if (ret <0 ) { +if (ret <0 ||block_job_is_cancelled (&job->common)) {/* Merge the successor back into the parent, delete nothing. */ bm =bdrv_reclaim_dirty_bitmap (bs, job->sync_bitmap,NULL );assert (bm);Didn't Jeff Cody already stage this?
Quoted 1 line
Yes
Thanks!
Quoted 30 lines · Stefan Hajnoczi
Quoted 29 lines · Jeff Cody
Quoted 28 lines · John Snow
Quoted 17 lines · Stefan Hajnoczi
Reclaim the dirty bitmap if an incremental backup block job is cancelled. The ret variable may be 0 when the job is cancelled so it's not enough to check ret < 0.
Reviewed-by John Snow <[email protected]>Reviewed-by Max Reitz <[email protected]>Signed-off-by Stefan Hajnoczi <[email protected]>--- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)block/backup.c +0
-0block/backup.c static void coroutine_fn backup_run(void *opaque) · line 437
Quoted 8 lines
block/backup.c +1
-1@@ -431,7 +431,7 @@ static void coroutine_fn backup_run(void *opaque)if (job->sync_bitmap) {BdrvDirtyBitmap *bm; -if (ret <0 ) { +if (ret <0 ||block_job_is_cancelled (&job->common)) {/* Merge the successor back into the parent, delete nothing. */ bm =bdrv_reclaim_dirty_bitmap (bs, job->sync_bitmap,NULL );assert (bm);Didn't Jeff Cody already stage this?
Quoted 2 lines
Quoted 1 line
Yes
Thanks!
It appears like I successfully confused Stefan, thanks to John not wanting to embarrass me in public. :-)