From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V19HH-00028T-Ju for qemu-devel@nongnu.org; Mon, 22 Jul 2013 02:07:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V19HE-0003Rw-Qy for qemu-devel@nongnu.org; Mon, 22 Jul 2013 02:07:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V19HE-0003Rp-JI for qemu-devel@nongnu.org; Mon, 22 Jul 2013 02:07:20 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6M67JL3005796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Jul 2013 02:07:19 -0400 Date: Mon, 22 Jul 2013 14:07:15 +0800 From: Fam Zheng Message-ID: <20130722060715.GA23540@T430s.redhat.com> References: <1374054136-28741-1-git-send-email-famz@redhat.com> <1374054136-28741-11-git-send-email-famz@redhat.com> <51E68FBC.10200@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51E68FBC.10200@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options Reply-To: famz@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, hbrock@redhat.com, qemu-devel@nongnu.org, rjones@redhat.com, imain@redhat.com, stefanha@redhat.com 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. -- Fam