From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAz3c-0003CB-IZ for qemu-devel@nongnu.org; Fri, 23 Mar 2012 03:37:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SAz3W-0004YQ-Ty for qemu-devel@nongnu.org; Fri, 23 Mar 2012 03:37:08 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:41975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAz3W-0004Xt-Kd for qemu-devel@nongnu.org; Fri, 23 Mar 2012 03:37:02 -0400 Received: by werp12 with SMTP id p12so2862581wer.4 for ; Fri, 23 Mar 2012 00:37:00 -0700 (PDT) From: =?UTF-8?q?Beno=C3=AEt=20Canet?= Date: Fri, 23 Mar 2012 08:36:48 +0100 Message-Id: <1332488214-4685-2-git-send-email-benoit.canet@gmail.com> In-Reply-To: <1332488214-4685-1-git-send-email-benoit.canet@gmail.com> References: <1332488214-4685-1-git-send-email-benoit.canet@gmail.com> Subject: [Qemu-devel] [PATCH V3 1/7] block: Add new BDRV_O_INCOMING flag to notice incoming live migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Beno=C3=AEt=20Canet?= , stefanha@linux.vnet.ibm.com >>From original patch with Patchwork-id: 31110 by Stefan Hajnoczi "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 --- block.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/block.h b/block.h index 415bb17..b3b18d6 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