Received: from eggs.gnu.org ([2001:4830:134:3::10]:41669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0VcI-0004mn-9k for qemu-devel@nongnu.org; Mon, 15 Dec 2014 08:23:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0VcD-0002Bv-TH for qemu-devel@nongnu.org; Mon, 15 Dec 2014 08:23:14 -0500 Received: from relay.parallels.com ([195.214.232.42]:50906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0VcD-00021v-Kx for qemu-devel@nongnu.org; Mon, 15 Dec 2014 08:23:09 -0500 Date: Mon, 15 Dec 2014 16:08:03 +0300 From: Roman Kagan Message-ID: <20141215130802.GC2816@rkaganb.sw.ru> References: <1418632081-20667-1-git-send-email-den@openvz.org> <1418632081-20667-12-git-send-email-den@openvz.org> <20141215123003.GG4411@noname.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20141215123003.GG4411@noname.str.redhat.com> Subject: Re: [Qemu-devel] [PATCH 11/16] block/parallels: add support for backing files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: "Denis V. Lunev" , Jeff Cody , qemu-devel@nongnu.org, Stefan Hajnoczi On Mon, Dec 15, 2014 at 01:30:03PM +0100, Kevin Wolf wrote: > Am 15.12.2014 um 09:27 hat Denis V. Lunev geschrieben: > > From: Roman Kagan > > > > Add backing file support to Parallels format driver. > > > > That said, I think backing file operations should end up in the generic > > block layer, but that's a longer story... > > > > Signed-off-by: Roman Kagan > > Signed-off-by: Denis V. Lunev > > CC: Jeff Cody > > CC: Kevin Wolf > > CC: Stefan Hajnoczi > > How are users supposed to make use of this? bs->backing_file isn't set > during parallels_open(), so you generally dont' get a backing file. > > Users might manually add -drive backing=..., but is there really no > support for storing the backing file in the image format? If so, perhaps > it's better not to support backing files at all here. Parallels virtual disks (as also used by ploop, http://openvz.org/Ploop) consist of a descriptor xml file and one or more data files. The data files may have delta/backing relationships; those relationships are only stored in the descriptor file. The original parallels driver in qemu used to support direct access to the data files. This patch makes it possible for such a data file to be a delta WRT a backing file, specified externally (see e.g. the patch to the tests). The code for parsing the descriptor xml and filling in the delta/backing relations isn't there yet; we haven't yet figured out where it fits best. Still it makes up a perfectly valid usecase to figure out those relations by some external means (e.g. eye inspection of the descriptor file :) and construct appropriate JSON filename for use in any scenario where a readonly image can be used in qemu. Roman.