qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH 1/4] block/backup: delete target after completio


From: Fam Zheng
Subject: [Qemu-devel] [RFC PATCH 1/4] block/backup: delete target after completion callback
Date: Mon, 29 Jul 2013 12:25:29 +0800

Move bdrv_delete(target) one line down to give block job caller a chance
to handle target on completion before deleting it.

Signed-off-by: Fam Zheng <address@hidden>
---
 block/backup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/backup.c b/block/backup.c
index 6ae8a05..d80341c 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -338,9 +338,9 @@ static void coroutine_fn backup_run(void *opaque)
     hbitmap_free(job->bitmap);
 
     bdrv_iostatus_disable(target);
-    bdrv_delete(target);
 
     block_job_completed(&job->common, ret);
+    bdrv_delete(target);
 }
 
 void backup_start(BlockDriverState *bs, BlockDriverState *target,
-- 
1.8.3.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]