qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC PATCH 01/10] block: Add new BDRV_O_INCOMING flag to no


From: Benoît Canet
Subject: [Qemu-devel] [RFC PATCH 01/10] block: Add new BDRV_O_INCOMING flag to notice incoming live migration
Date: Tue, 6 Mar 2012 18:32:20 +0100

>From original patch with Patchwork-id: 31110 by
Stefan Hajnoczi <address@hidden>

"Add a flag to indicate that incoming migration is pending and care needs
to be taken for data consistency.  Block drivers should not modify the
image file before incoming migration is complete since the migration
source host is still using the image file."

The rationale for not using bdrv->read_only is the following.

"Unfortunately this is not possible because too many other places in QEMU
test bdrv_is_read_only() and use it for their own evil purposes.  For
example, ide_init_drive() will error out because read-only harddisks are
not supported.  We're mixing guest and host side read-only concepts so
this simpler alternative does not work."

Signed-off-by: Benoit Canet <address@hidden>
---
 block.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/block.h b/block.h
index 48d0bf3..e320d8f 100644
--- a/block.h
+++ b/block.h
@@ -71,6 +71,7 @@ typedef struct BlockDevOps {
 #define BDRV_O_NO_BACKING  0x0100 /* don't open the backing file */
 #define BDRV_O_NO_FLUSH    0x0200 /* disable flushing on this disk */
 #define BDRV_O_COPY_ON_READ 0x0400 /* copy read backing sectors into image */
+#define BDRV_O_INCOMING    0x0800  /* consistency hint for incoming migration 
*/
 
 #define BDRV_O_CACHE_MASK  (BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH)
 
-- 
1.7.7.6




reply via email to

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