[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block
From: |
Bharata B Rao |
Subject: |
Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend |
Date: |
Wed, 15 Aug 2012 14:21:58 +0530 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Aug 14, 2012 at 10:29:26AM +0200, Kevin Wolf wrote:
> Am 14.08.2012 06:38, schrieb Bharata B Rao:
> > Kevin, Thanks for your review. I will address all of your comments
> > in the next iteration, but have a few questions/comments on the others...
> >
> > On Mon, Aug 13, 2012 at 02:50:29PM +0200, Kevin Wolf wrote:
> >>> +static int parse_server(GlusterURI *uri, char *server)
> >>> +{
> >>> + int ret = -EINVAL;
> >>> + char *token, *saveptr;
> >>> + char *p, *q = server;
> >>> +
> >>> + p = strchr(server, '[');
> >>> + if (p) {
> >>> + /* [ipv6] */
> >>> + if (p != server) {
> >>> + /* [ not in the beginning */
> >>> + goto out;
> >>> + }
> >>> + q++;
> >>> + p = strrchr(p, ']');
> >>> + if (!p) {
> >>> + /* No matching ] */
> >>> + goto out;
> >>> + }
> >>> + *p++ = '\0';
> >>> + uri->server = g_strdup(q);
> >>> +
> >>> + if (*p) {
> >>> + if (*p != ':') {
> >>> + /* [ipv6] followed by something other than : */
> >>> + goto out;
> >>> + }
> >>> + uri->port = strtoul(++p, NULL, 0);
> >>> + if (uri->port < 0) {
> >>> + goto out;
> >>> + }
> >>
>
> > In any case, let me see if I can get rid of this altogether and reuse
> > qemu-sockets.c:inet_parse().
Using inet_parse() outside of qemu-sockets.c needs some work like
making it non-static, defining QemuOptsList for inet opts and fixing
some issues with inet_parse(like making it successfully parse 'hostname' also
instead of just 'hostname:port').
I will give this a try and send a patch.
Regards,
Bharata.
- [Qemu-devel] [PATCH v6 1/2] qemu: Add a config option for GlusterFS as block backend, (continued)
- [Qemu-devel] [PATCH v6 1/2] qemu: Add a config option for GlusterFS as block backend, Bharata B Rao, 2012/08/09
- [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend, Bharata B Rao, 2012/08/09
- Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend, Kevin Wolf, 2012/08/13
- Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend, Bharata B Rao, 2012/08/14
- Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend, Kevin Wolf, 2012/08/14
- Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend, Bharata B Rao, 2012/08/14
- Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend, Kevin Wolf, 2012/08/14
- Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend, Bharata B Rao, 2012/08/15
- Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend, Kevin Wolf, 2012/08/15
- Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend, Bharata B Rao, 2012/08/15
- Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend,
Bharata B Rao <=
- Re: [Qemu-devel] [PATCH v6 0/2] GlusterFS support in QEMU - v6, Bharata B Rao, 2012/08/13