From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Za0Jy-0006mg-4h for qemu-devel@nongnu.org; Thu, 10 Sep 2015 07:47:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Za0Ju-0000Sl-UN for qemu-devel@nongnu.org; Thu, 10 Sep 2015 07:47:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Za0Ju-0000SX-NH for qemu-devel@nongnu.org; Thu, 10 Sep 2015 07:47:14 -0400 Date: Thu, 10 Sep 2015 13:47:11 +0200 From: Kevin Wolf Message-ID: <20150910114711.GB4460@noname.redhat.com> References: <1441717449-31609-1-git-send-email-prasanna.kalever@redhat.com> <20150908150204.GI4307@redhat.com> <20150909094629.GK9777@stefanha-thinkpad.redhat.com> <55F007A3.4070403@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/1] block/gluster: add support for multiple gluster backup volfile servers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Deepak Shetty Cc: Stefan Hajnoczi , qemu-devel , Deepak C Shetty , Bharata B Rao , Raghavendra Talur , Prasanna Kumar Kalever Am 10.09.2015 um 07:42 hat Deepak Shetty geschrieben: > [snip] >=20 > On Wed, Sep 9, 2015 at 10:37 PM, Raghavendra Talur = wrote: >=20 >=20 >=20 > From QEMU's perspective, it would be better to use separate fields >=20 > (that have type information) than to encode everything in an op= aque > URI string.=A0 Fields can do input validation in common code so= that > block drivers don't need to check whether something is a valid = number, > for example.=A0 Fields can also be listed and their type inform= ation can > be displayed so the user knows the expected range of inputs > (self-documenting). >=20 >=20 > Coming from Gluster side of things, =A0the variable/option here is = tuple of > three > =A0 =A0 transport-type > =A0 =A0 server > =A0 =A0 port=A0 >=20 > volname and file name should be the same in all the URIs. Just poin= ting > out here so that implementation can ensure that all URIs have the s= ame > volname and filename; > which are testvol and a.img in the above example. >=20 > By fields if you mean something like=A0 > -drive file=3Dgluster[+transport]://[server[:port]]/volname/image[?= socket > =3D...],\ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0file.backup-volfile-server=3D[tcp:|r= dma:|unix:]server2[:port], > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0file.backup-volfile-server=3D[tcp:|r= dma:|unix:]server2[:port] >=20 >=20 > Raghavendra, > =A0 Thanks for pitching in. >=20 > So are you saying that its possible to have different transport types (= tcp, > rdma etc) > for different gluster server nodes, all of which are part of the same c= luster ? >=20 > If that is true then in the above suggestion of yours, gluster [+transp= ort]:// > doesn't make sense, since it gives a feeling that the transport mention= ed > before :// applies to whole URI, only to be overridden by the later > file.backup-volfile-server=3D option >=20 > Maybe then as kwolf mentioned in prev thread of this mail ... >=20 >=20 > -drive driver=3Dgluster,uri[0]=3Dgluster[+transport-type]://server1:2= 4007/testvol/a.img, > uri[1]=3Dgluster[+transport-type]://server2:240= 08/testvol/a.img, > uri[2]=3Dgluster[+transport-type]://server3:240= 09/testvol/a.img To be clear, I did _not_ say that you should use URIs. I think URIs are a convenient shortcut syntax for simple setups. More complex setups should use structured options, which should be defined in the QAPI schema. The command line options are directly derived from that then. URIs would still be supported as a shortcut syntax on the command line, but internally they would be converted into structured options before .bdrv_open() would be called. You can check the nbd or ssh drivers for comparison, they already work like that. Kevin