From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzRYK-0004fJ-Cy for qemu-devel@nongnu.org; Wed, 17 Jul 2013 09:13:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzRYF-0008Fp-IK for qemu-devel@nongnu.org; Wed, 17 Jul 2013 09:13:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzRYF-0008F6-9f for qemu-devel@nongnu.org; Wed, 17 Jul 2013 09:13:51 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6HDDo2u010038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Jul 2013 09:13:50 -0400 Message-ID: <51E69881.3060300@redhat.com> Date: Wed, 17 Jul 2013 15:13:37 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1374054136-28741-1-git-send-email-famz@redhat.com> <1374054136-28741-11-git-send-email-famz@redhat.com> <51E68FBC.10200@redhat.com> <20130717125810.GI2458@dhcp-200-207.str.redhat.com> In-Reply-To: <20130717125810.GI2458@dhcp-200-207.str.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Fam Zheng , hbrock@redhat.com, qemu-devel@nongnu.org, rjones@redhat.com, imain@redhat.com, stefanha@redhat.com Il 17/07/2013 14:58, Kevin Wolf ha scritto: > Am 17.07.2013 um 14:36 hat Paolo Bonzini geschrieben: >> Il 17/07/2013 11:42, Fam Zheng ha scritto: >>> This option allows overriding backing hd of drive. If the target drive >>> exists, it's referenced as the backing file and refcount incremented. >>> >>> Example: >>> qemu-system-x86_64 -drive \ >>> file.filename=foo.qcow2,if=none,id=foo \ >>> -drive file=bar.qcow2,backing=foo >> >> I guess this is where we need the soft reference. >> >> This has a _lot_ of potential for misuse, I think Kevin bashed me and >> Federico very heavily when we tried to do something similar. > > Not sure what exactly I "bashed" you for Doing strange things with bs->backing_hd (blkmirror comes to mind). > This is basically restarting the discussion where I suggested to give > the targets of a block job names so that they can be reused. It's about > the same kind of misuse that becomes possible and that we need to > protect against. Yes. But then I'm not sure why we need to rush in blockdev-backup now. Instead we can simply make drive-backup optionally give a name to the target. I understand this is the right thing to do long term, but pre-opening of the target is not really needed for fleecing. Paolo