From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFown-0004YR-2k for qemu-devel@nongnu.org; Thu, 05 Apr 2012 11:50:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFowa-0007Aj-Fq for qemu-devel@nongnu.org; Thu, 05 Apr 2012 11:50:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFowa-00079t-7M for qemu-devel@nongnu.org; Thu, 05 Apr 2012 11:49:52 -0400 From: Kevin Wolf Date: Thu, 5 Apr 2012 17:52:18 +0200 Message-Id: <1333641144-13612-41-git-send-email-kwolf@redhat.com> In-Reply-To: <1333641144-13612-1-git-send-email-kwolf@redhat.com> References: <1333641144-13612-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 40/46] 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: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Beno=C3=AEt Canet >>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 Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/block.h b/block.h index 4e99e18..5151dea 100644 --- a/block.h +++ b/block.h @@ -78,6 +78,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 ima= ge */ +#define BDRV_O_INCOMING 0x0800 /* consistency hint for incoming migr= ation */ =20 #define BDRV_O_CACHE_MASK (BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NO= _FLUSH) =20 --=20 1.7.6.5