From patchwork Tue Mar 6 17:32:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benoit Canet X-Patchwork-Id: 144962 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 78141B6F98 for ; Wed, 7 Mar 2012 04:33:06 +1100 (EST) Received: from localhost ([::1]:52562 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4yFz-0000ff-Qp for incoming@patchwork.ozlabs.org; Tue, 06 Mar 2012 12:33:03 -0500 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) Received-SPF: pass (google.com: domain of benoit.canet@gmail.com designates 10.216.137.156 as permitted sender) client-ip=10.216.137.156; Authentication-Results: mr.google.com; spf=pass (google.com: domain of benoit.canet@gmail.com designates 10.216.137.156 as permitted sender) smtp.mail=benoit.canet@gmail.com; dkim=pass header.i=benoit.canet@gmail.com Received: from mr.google.com ([10.216.137.156]) by 10.216.137.156 with SMTP id y28mr6565839wei.61.1331055156314 (num_hops = 1); Tue, 06 Mar 2012 09:32:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=DQ8xFJ79q+hKNFfezo3TNklf6sCndL/BMsaydxsvMEU=; b=AA2nse8E9HUIPsU0HFOfz6nkvbK75jj3mpwBQu2G5PP2YdcpFXc3jAF2bNT2/MZffC OYTwvHaIkbxJZ8BL/qn3hmE2W4FVlE7e5Nz+eT+YILgZp4P3b6MCEyRDK0v/YMZUO2zK hZjsYiKVpjKEmovOJmTGc/MmLVEElVKST9aRTTM/MzLXNZqTVaoLeQhqoE5Y7mH8YBnc RbEPrP+WKRMs2xogbITCDEB+VjXqTAI4CH4QTFyHuQuSxCbawb0ZD/yf2v8TepqiegGk OOYnqqC8loYcaj0nhRaRKYYNy8FhkKnNw6ZwfQ41SIMAGpcQ9GAfiEi6o9OXjv9RDKMw lcTQ== Received: by 10.216.137.156 with SMTP id y28mr5263330wei.61.1331055156246; Tue, 06 Mar 2012 09:32:36 -0800 (PST) Received: from Laure.box.in.chocolate-blue.net ([109.190.18.76]) by mx.google.com with ESMTPS id hn8sm81593717wib.11.2012.03.06.09.32.35 (version=SSLv3 cipher=OTHER); Tue, 06 Mar 2012 09:32:35 -0800 (PST) From: =?UTF-8?q?Beno=C3=AEt=20Canet?= To: qemu-devel@nongnu.org Date: Tue, 6 Mar 2012 18:32:20 +0100 Message-Id: <1331055149-10982-2-git-send-email-benoit.canet@gmail.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1331055149-10982-1-git-send-email-benoit.canet@gmail.com> References: <1331055149-10982-1-git-send-email-benoit.canet@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.53 Cc: pbonzini@redhat.com, =?UTF-8?q?Beno=C3=AEt=20Canet?= , stefanha@linux.vnet.ibm.com, wolf@redhat.com Subject: [Qemu-devel] [RFC PATCH 01/10] block: Add new BDRV_O_INCOMING flag to notice incoming live migration X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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)