From patchwork Mon Apr 4 13:43:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alberto Garcia X-Patchwork-Id: 8741161 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9CF8B9F39A for ; Mon, 4 Apr 2016 13:47:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F13EB2025A for ; Mon, 4 Apr 2016 13:47:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 35AB7201CE for ; Mon, 4 Apr 2016 13:47:31 +0000 (UTC) Received: from localhost ([::1]:58745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an4qo-0005mo-B5 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 04 Apr 2016 09:47:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an4oi-00021x-TA for qemu-devel@nongnu.org; Mon, 04 Apr 2016 09:45:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1an4oe-0000AU-U9 for qemu-devel@nongnu.org; Mon, 04 Apr 2016 09:45:20 -0400 Received: from smtp3.mundo-r.com ([212.51.32.191]:15153 helo=smtp4.mundo-r.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an4oe-0008Qw-Nt; Mon, 04 Apr 2016 09:45:16 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CSAwCybgJX/5tjdVtdgzeBUKcVAQEBAQEFAYERAZBmgg8BDYFyhg0CgTM4FAEBAQEBAQFlJ4RCAQEEJ1IQPxI8GxmIKwG9BwEphViCRYdYhQoFh2+FXnCJRIhlhSOJOoVVjxoeAQFCg2ppiCYBAQE X-IPAS-Result: A2CSAwCybgJX/5tjdVtdgzeBUKcVAQEBAQEFAYERAZBmgg8BDYFyhg0CgTM4FAEBAQEBAQFlJ4RCAQEEJ1IQPxI8GxmIKwG9BwEphViCRYdYhQoFh2+FXnCJRIhlhSOJOoVVjxoeAQFCg2ppiCYBAQE X-IronPort-AV: E=Sophos;i="5.24,440,1454972400"; d="scan'208";a="39334337" Received: from fanzine.igalia.com ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 04 Apr 2016 15:44:37 +0200 Received: from [194.100.51.2] (helo=perseus.local) by fanzine.igalia.com with esmtpsa (Cipher TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim) id 1an4o0-000511-Vz; Mon, 04 Apr 2016 15:44:37 +0200 Received: from berto by perseus.local with local (Exim 4.87) (envelope-from ) id 1an4nj-0003vb-4Z; Mon, 04 Apr 2016 16:44:19 +0300 From: Alberto Garcia To: qemu-devel@nongnu.org Date: Mon, 4 Apr 2016 16:43:58 +0300 Message-Id: <04a65660aba2a58c3710caf0e1c4dc7eb04d3082.1459776815.git.berto@igalia.com> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.51.32.191 Cc: Kevin Wolf , Alberto Garcia , qemu-block@nongnu.org, Max Reitz , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH v9 08/11] docs: Document how to stream to an intermediate layer 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- docs/live-block-ops.txt | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/docs/live-block-ops.txt b/docs/live-block-ops.txt index a257087..a05d869 100644 --- a/docs/live-block-ops.txt +++ b/docs/live-block-ops.txt @@ -10,9 +10,9 @@ Snapshot live merge Given a snapshot chain, described in this document in the following format: -[A] -> [B] -> [C] -> [D] +[A] <- [B] <- [C] <- [D] <- [E] -Where the rightmost object ([D] in the example) described is the current +Where the rightmost object ([E] in the example) described is the current image which the guest OS has write access to. To the left of it is its base image, and so on accordingly until the leftmost image, which has no base. @@ -21,11 +21,14 @@ The snapshot live merge operation transforms such a chain into a smaller one with fewer elements, such as this transformation relative to the first example: -[A] -> [D] +[A] <- [E] -Currently only forward merge with target being the active image is -supported, that is, data copy is performed in the right direction with -destination being the rightmost image. +Data is copied in the right direction with destination being the +rightmost image, but any other intermediate image can be specified +instead. In this example data is copied from [C] into [D], so [D] can +be backed by [B]: + +[A] <- [B] <- [D] <- [E] The operation is implemented in QEMU through image streaming facilities. @@ -35,14 +38,20 @@ streaming operation completes it raises a QMP event. 'block_stream' copies data from the backing file(s) into the active image. When finished, it adjusts the backing file pointer. -The 'base' parameter specifies an image which data need not be streamed from. -This image will be used as the backing file for the active image when the -operation is finished. +The 'base' parameter specifies an image which data need not be +streamed from. This image will be used as the backing file for the +destination image when the operation is finished. -In the example above, the command would be: +In the first example above, the command would be: -(qemu) block_stream virtio0 A +(qemu) block_stream virtio0 file-A.img +In order to specify a destination image different from the active +(rightmost) one we can use its (previously set) node name instead. + +In the second example above, the command would be: + +(qemu) block_stream node-D file-B.img Live block copy ===============