Received: from eggs.gnu.org ([2001:4830:134:3::10]:54164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1iij-0008N2-MB for qemu-devel@nongnu.org; Tue, 23 Jul 2013 15:58:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1iih-0002xn-4H for qemu-devel@nongnu.org; Tue, 23 Jul 2013 15:58:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1iig-0002xg-Rz for qemu-devel@nongnu.org; Tue, 23 Jul 2013 15:58:03 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6NJw2On015513 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 23 Jul 2013 15:58:02 -0400 Date: Tue, 23 Jul 2013 12:57:58 -0700 From: Ian Main Message-ID: <20130723195758.GB2744@gate.mains.priv> References: <1374054136-28741-1-git-send-email-famz@redhat.com> <1374054136-28741-11-git-send-email-famz@redhat.com> <51E68FBC.10200@redhat.com> <20130722060715.GA23540@T430s.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130722060715.GA23540@T430s.redhat.com> 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: Fam Zheng Cc: kwolf@redhat.com, hbrock@redhat.com, qemu-devel@nongnu.org, rjones@redhat.com, stefanha@redhat.com, Paolo Bonzini On Mon, Jul 22, 2013 at 02:07:15PM +0800, Fam Zheng wrote: > On Wed, 07/17 14:36, Paolo Bonzini wrote: > > 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. > > > > block/backup.c is the right place where we can override the backing hd > > of the drive. Perhaps we can add a way to open a file with > > BDRV_O_NO_BACKING from the command line. > > OK. If we get the override in block/backup.c, the only thing we need is > naming the target so we can add it to nbd server. If refcounting, > overriding backing with option and blockdev-backup are still good to > have, I can split them and targeting to future releases. In my latest patchset I have attempted to override the backing hd of the target. It is a little over my head however so any input there would be appreciated. It seems to me like applying that patch would get us a working baseline and then you can add the more fancy stuff on top of that? That sound reasonable? Ian