Received: from eggs.gnu.org ([2001:4830:134:3::10]:48858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvsnV-0000zH-K7 for qemu-devel@nongnu.org; Tue, 02 Dec 2014 14:07:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvsnP-0003Eo-8O for qemu-devel@nongnu.org; Tue, 02 Dec 2014 14:07:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvsnP-0003EW-1B for qemu-devel@nongnu.org; Tue, 02 Dec 2014 14:07:35 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sB2J7XMI027757 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 2 Dec 2014 14:07:34 -0500 From: Markus Armbruster References: <1410411902-7104-1-git-send-email-famz@redhat.com> <1410411902-7104-2-git-send-email-famz@redhat.com> <20141031090106.GA4496@noname.str.redhat.com> <20141103014658.GA4915@fam-t430.nay.redhat.com> <20141103143257.GF22901@noname.str.redhat.com> <20141104015938.GB2679@fam-t430.nay.redhat.com> <87a947o41i.fsf@blackfin.pond.sub.org> <20141104071816.GA17719@fam-t430.nay.redhat.com> Date: Tue, 02 Dec 2014 20:07:31 +0100 In-Reply-To: <20141104071816.GA17719@fam-t430.nay.redhat.com> (Fam Zheng's message of "Tue, 4 Nov 2014 15:18:16 +0800") Message-ID: <87r3whvpjg.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 1/3] qmp: Add command 'blockdev-backup' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , pbonzini@redhat.com, qemu-devel@nongnu.org, Stefan Hajnoczi Fam Zheng writes: > On Tue, 11/04 07:47, Markus Armbruster wrote: >> Fam Zheng writes: >> >> > On Mon, 11/03 15:32, Kevin Wolf wrote: >> >> Am 03.11.2014 um 02:46 hat Fam Zheng geschrieben: >> >> > On Fri, 10/31 10:01, Kevin Wolf wrote: >> >> > > Am 11.09.2014 um 07:05 hat Fam Zheng geschrieben: >> >> > > > Similar to drive-backup, but this command uses a device id as target >> >> > > > instead of creating/opening an image file. >> >> > > > >> >> > > > Also add blocker on target bs, since the target is also a >> >> > > > named device >> >> > > > now. >> >> > > > >> >> > > > Add check and report error for bs == target which became >> >> > > > possible but is >> >> > > > an illegal case with introduction of blockdev-backup. >> >> > > > >> >> > > > Signed-off-by: Fam Zheng >> >> > > >> >> > > > diff --git a/qapi/block-core.json b/qapi/block-core.json >> >> > > > index a685d02..b953c7b 100644 >> >> > > > --- a/qapi/block-core.json >> >> > > > +++ b/qapi/block-core.json >> >> > > > @@ -669,6 +669,40 @@ >> >> > > > '*on-target-error': 'BlockdevOnError' } } >> >> > > > >> >> > > > ## >> >> > > > +# @BlockdevBackup >> >> > > > +# >> >> > > > +# @device: the name of the device which should be copied. >> >> > > > +# >> >> > > > +# @target: the name of the backup target device. >> >> > > >> >> > > Both of these are either a BlockBackend ID or a BDS >> >> > > node-name, right? Do >> >> > > we have a standard way of expressing this? "name of the device" isn't >> >> > > quite clear. >> >> > >> >> > "name of the device" is used everywhere to document the "device" >> >> > parameters in >> >> > our json schema. Since we have BlockBackend now, device-name >> >> > and node-name >> >> > could be better distinguished. All we have to do is giving a >> >> > beautiful name to >> >> > both. >> >> > >> >> > [This patch is only a copy&paste and is consistent with the >> >> > rest part of the >> >> > file. So I'll leave it for now :] >> >> >> >> The rest of the file doesn't accept node names. But looking at your >> >> actual code, it seems that you are doing the same (by usign bdrv_find() >> >> instead of bdrv_lookup_bs()). >> > >> > Yes, to be consistent with drive-backup. >> > >> >> >> >> Shouldn't a proper blockdev-* command accept node names as well? >> >> >> > >> > I am not sure, it's still blockdev-backup, not blocknode-backup. >> > >> > I think that may be another thing, to changed drive-*'s @device >> > parameter, and >> > blockdev-*'s @device and @target to accept node names, altogether. >> >> We have many commands identifying nodes by some name: root nodes by BDS >> device_name[] (now BB name), inner nodes by "file name" (ugh), and >> arbitrary nodes by BDS name_name[]. >> >> An obvious task is deprecating "file name" in favor of node names. >> >> Less obvious is where to accept a node name instead of / in addition to >> a device name. >> >> Want me to start a thread on this? > > Yes please, it's good to review the situation and make some concrete > convention and plan for the transition. Done: Review of monitor commands identifying BDS / BB by name