From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgBkc-0004W0-FX for qemu-devel@nongnu.org; Thu, 09 Apr 2015 08:40:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgBkY-0003Hl-UM for qemu-devel@nongnu.org; Thu, 09 Apr 2015 08:40:06 -0400 Date: Thu, 9 Apr 2015 14:40:00 +0200 From: Alberto Garcia Message-ID: <20150409124000.GA2500@igalia.com> References: <20150402132857.GA26513@igalia.com> <20150409103928.GB2783@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409103928.GB2783@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [RFC] Intermediate block mirroring List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org On Thu, Apr 09, 2015 at 11:39:28AM +0100, Stefan Hajnoczi wrote: > > The goal would be to convert this: > > > > [A] -> [B] -> [C] -> [D] > > > > into this: > > > > [A] -> [B] -> [X] -> [D] > > > > where [D] is the active image and [X] would be a copy of [C]. The > > latter would be unlinked from the chain. > > > > A use case would be to move disk images across different storage > > backends. > > The simple solution to that problem is: > > Assumption: backing files are read only. (True in most cases.) > > 1. Copy the backing files using cp(1) or another method. > 2. Issue QMP 'change-backing-file' command so that [D] uses [X] instead > of [C]. > > So it can be done today already. So do you think it would be better to implement this somewhere else? The code that I have for QEMU is quite simple, the actual algorithm doesn't change, it only needs to do the changing of backing files in mirror_exit(). Berto