From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrPJC-00079H-2y for qemu-devel@nongnu.org; Tue, 25 Jun 2013 05:13:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrPJA-00065t-R0 for qemu-devel@nongnu.org; Tue, 25 Jun 2013 05:13:05 -0400 Received: from mail-ea0-x231.google.com ([2a00:1450:4013:c01::231]:38352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrPJA-00065o-LH for qemu-devel@nongnu.org; Tue, 25 Jun 2013 05:13:04 -0400 Received: by mail-ea0-f177.google.com with SMTP id j14so6599218eak.36 for ; Tue, 25 Jun 2013 02:13:04 -0700 (PDT) Date: Tue, 25 Jun 2013 11:13:00 +0200 From: Stefan Hajnoczi Message-ID: <20130625091300.GA26177@stefanha-thinkpad.redhat.com> References: <51C2C465.1090701@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51C2C465.1090701@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [RFC] qemu-img: add option -d in convert List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: Kevin Wolf , Anthony Liguori , qemu-devel , Paolo Bonzini , Dietmar Maurer On Thu, Jun 20, 2013 at 04:59:17PM +0800, Wenchao Xia wrote: If I understand correctly, you have a backing chain with internal snapshots: > imageA(sn0)->imageB(sn0,sn1)->imageC(sn0) And you want to convert this to a chain of external snapshots: > imageA_sn0.qcow2-->imageA.qcow2-->imageB_sn0.qcow2-->imageB_sn1.qcow2- > ->imageB.qcow2-->imageC_sn0.qcow2-->imageC.qcow2 You also want each image file to contain only data that is not in the parent. So imageA.qcow2 would not contain identical clusters from imageA_sn0.qcow2. The most efficient way of doing this is by looking into the L1/L2 tables of the imageA(sn0) and imageA so that you know which clusters are different. This is a weird operation. It also has a dual, converting the external snapshot chain into a chain of image files with internal snapshots - again sharing clusters instead of duplicating them. It's possible to implement this but I'm a little surprised that anyone would want to do this. And I wonder if management tools can cope with this mix of internal and external snapshots :). Stefan