From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vqaqv-0006yr-BL for qemu-devel@nongnu.org; Tue, 10 Dec 2013 22:52:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vqaqp-0004cr-Ae for qemu-devel@nongnu.org; Tue, 10 Dec 2013 22:52:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vqaqp-0004ck-0s for qemu-devel@nongnu.org; Tue, 10 Dec 2013 22:52:43 -0500 Message-ID: <52A7E17C.8040504@redhat.com> Date: Wed, 11 Dec 2013 11:52:28 +0800 From: Fam Zheng MIME-Version: 1.0 References: <1386263703-19292-1-git-send-email-benoit@irqsave.net> <1386263703-19292-5-git-send-email-benoit@irqsave.net> <20131206092703.5d60345a@redhat.com> <52A1EC31.7000709@redhat.com> <20131206115215.0427a956@redhat.com> <20131209162309.GJ3549@dhcp-200-207.str.redhat.com> <20131209114109.1c4a8d5f@redhat.com> <20131210095750.GC3656@dhcp-200-207.str.redhat.com> <20131210090620.4bc73895@redhat.com> <20131210142507.GE3656@dhcp-200-207.str.redhat.com> <20131210101613.7a38dadc@redhat.com> In-Reply-To: <20131210101613.7a38dadc@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V4 4/7] qmp: Allow to change password on names block driver states. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino , Kevin Wolf Cc: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , jcody@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On 2013=E5=B9=B412=E6=9C=8810=E6=97=A5 23:16, Luiz Capitulino wrote: > On Tue, 10 Dec 2013 15:25:07 +0100 > Kevin Wolf wrote: > >> My objection to your approach is strong because Beno=C3=AEt already se= nt an >> alternative which I believe is less worse because with it, arguments >> actually mean what their names tell instead of having additional bools >> for "oh, and I said A, but I didn't mean it, I really want B". > > Current proposal: > > { 'command': 'block_passwd', 'data': {'*device': 'str', > '*node-name': 'str', 'password':= 'str'} } > I vote for this. > When I look at it, I ask myself: > > - What happens when device=3DNULL? > > - What happens when node-name=3DNULL? > > - What happens when device=3DNULL and node-name=3DNULL? > > - What happens when device !=3D NULL and node-node !=3D NULL? > > - What happens when device !=3D NULL but node-node=3DNULL? > > - What happens when device=3DNULL but node-node !=3D NULL? > > My proposal: > > { 'command': 'block_passwd', 'data': {'device': 'str', > '*device-is-node': 'bool', 'pass= word': 'str'} } > > - What happens when device-is-node=3DNULL? > > - What happens when device-is-node !=3D NULL? > I think our starting point is that device names and node names are=20 separate name spaces. For this reason we should avoid connecting them by=20 reusing one field. From a user's view, "device-is-node", or anything=20 meaning this, just doesn't sound interesting, because we also told them=20 "device-is-not-node". Fam