From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZFR0-0007Tr-Vf for qemu-devel@nongnu.org; Mon, 15 Aug 2016 06:48:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZFQx-00067v-Rm for qemu-devel@nongnu.org; Mon, 15 Aug 2016 06:47:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZFQx-00067r-M6 for qemu-devel@nongnu.org; Mon, 15 Aug 2016 06:47:55 -0400 Date: Mon, 15 Aug 2016 12:47:52 +0200 From: Kevin Wolf Message-ID: <20160815104752.GE6024@noname.str.redhat.com> References: <1471149312-28148-1-git-send-email-ashish.mittal@veritas.com> <20160815102046.GC13261@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160815102046.GC13261@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Ashish Mittal , qemu-devel@nongnu.org, pbonzini@redhat.com, armbru@redhat.com, ashish.mittal@veritas.com, stefanha@gmail.com, Ketan.Nilangekar@veritas.com, Abhijit.Dey@veritas.com Am 15.08.2016 um 12:20 hat Daniel P. Berrange geschrieben: > On Sat, Aug 13, 2016 at 09:35:12PM -0700, Ashish Mittal wrote: > > +/* > > + * vxhs_parse_uri: Parse the incoming URI and populate *conf with the > > + * vdisk_id, and all the host(s) information. Host at index 0 is local storage > > + * agent and the rest, reflection target storage agents. The local storage > > + * agent ip is the efficient internal address in the uri, e.g. 192.168.0.2. > > + * The local storage agent address is stored at index 0. The reflection target > > + * ips, are the E-W data network addresses of the reflection node agents, also > > + * extracted from the uri. > > + */ > > +static int vxhs_parse_uri(BlockdevOptionsVxHS *conf, > > + const char *filename) > > Delete this method entirely. We should not be adding URI syntax for any new > block driver. The QAPI schema syntax is all we need. I disagree. URI syntax is nice for human users. However, you should use the proper interfaces to implement this, which is .bdrv_parse_filename(). This is a function that gets a string and converts it into a QDict, which is then passed to .bdrv_open(). So it uses exactly the same code path in .bdrv_open() as if used directly with QAPI. Kevin