From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4yFq-0000fW-RI for qemu-devel@nongnu.org; Tue, 06 Mar 2012 12:32:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4yFa-00054B-HD for qemu-devel@nongnu.org; Tue, 06 Mar 2012 12:32:54 -0500 Received: from mail-ww0-f53.google.com ([74.125.82.53]:57026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4yFa-00053f-8C for qemu-devel@nongnu.org; Tue, 06 Mar 2012 12:32:38 -0500 Received: by wgbfm10 with SMTP id fm10so3536275wgb.10 for ; Tue, 06 Mar 2012 09:32:36 -0800 (PST) From: =?UTF-8?q?Beno=C3=AEt=20Canet?= Date: Tue, 6 Mar 2012 18:32:20 +0100 Message-Id: <1331055149-10982-2-git-send-email-benoit.canet@gmail.com> In-Reply-To: <1331055149-10982-1-git-send-email-benoit.canet@gmail.com> References: <1331055149-10982-1-git-send-email-benoit.canet@gmail.com> Subject: [Qemu-devel] [RFC PATCH 01/10] 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: pbonzini@redhat.com, =?UTF-8?q?Beno=C3=AEt=20Canet?= , stefanha@linux.vnet.ibm.com, wolf@redhat.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 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