qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v5 7/7] block: Allow backup on referenced named Bloc


From: Fam Zheng
Subject: [Qemu-devel] [PATCH v5 7/7] block: Allow backup on referenced named BlockDriverState
Date: Tue, 26 Nov 2013 12:05:28 +0800

Drive backup is a read only operation on source bs. We want to allow
this specific case to enable image-fleecing. Note that when
image-fleecing job starts, the job still add its blocker to source bs,
and any other operation on it will be blocked by that.

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

diff --git a/block.c b/block.c
index d633f2b..bb279d2 100644
--- a/block.c
+++ b/block.c
@@ -987,6 +987,8 @@ int bdrv_open_backing_file(BlockDriverState *bs, const char 
*backing_bs,
                    "device is used as backing hd of '%s'",
                    bs->device_name);
         bdrv_op_block_all(bs->backing_hd, bs->backing_blocker);
+        bdrv_op_unblock(bs->backing_hd, BLOCK_OP_TYPE_BACKUP_SOURCE,
+                        bs->backing_blocker);
         pstrcpy(bs->backing_file, sizeof(bs->backing_file),
                 bs->backing_hd->filename);
         pstrcpy(bs->backing_format, sizeof(bs->backing_format),
-- 
1.8.4.2




reply via email to

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