Re: [Qemu-devel] [PATCH v7 5/5] block: Support GlusterFS as a QEMU block backend.

2012-09-21 Thread Paolo Bonzini
Il 21/09/2012 05:50, Bharata B Rao ha scritto: >> > Just shooting around a possibility: why reinvent the wheel poorly if we >> > can use a full-blown URI parsing library? The libxml2 one is very good >> > and easy to use. >> > >> > It is also pretty much self-contained and has hardly seen a commi

Re: [Qemu-devel] [PATCH v7 5/5] block: Support GlusterFS as a QEMU block backend.

2012-09-20 Thread Bharata B Rao
On Thu, Sep 20, 2012 at 05:08:56PM +0200, Paolo Bonzini wrote: > > Just shooting around a possibility: why reinvent the wheel poorly if we > can use a full-blown URI parsing library? The libxml2 one is very good > and easy to use. > > It is also pretty much self-contained and has hardly seen a c

Re: [Qemu-devel] [PATCH v7 5/5] block: Support GlusterFS as a QEMU block backend.

2012-09-20 Thread Kevin Wolf
Am 20.09.2012 11:12, schrieb Bharata B Rao: > On Thu, Sep 20, 2012 at 10:20:33AM +0200, Paolo Bonzini wrote: >> Il 20/09/2012 09:53, Paolo Bonzini ha scritto: >> Would look a bit nicer with strstart() form cutils.c instead of >> strncmp(). > strstart() works with const char pointers, b

Re: [Qemu-devel] [PATCH v7 5/5] block: Support GlusterFS as a QEMU block backend.

2012-09-20 Thread Paolo Bonzini
Il 20/09/2012 11:12, Bharata B Rao ha scritto: >> > Perhaps it would be cleaner to make qemu_gluster_parseuri and >> > parse_gluster_spec accept a const char *. You can replace strtok_r + >> > g_strdup with strspn/strcspn followed by g_strndup. > I feel the current approach of using the combinatio

Re: [Qemu-devel] [PATCH v7 5/5] block: Support GlusterFS as a QEMU block backend.

2012-09-20 Thread Bharata B Rao
On Thu, Sep 20, 2012 at 10:20:33AM +0200, Paolo Bonzini wrote: > Il 20/09/2012 09:53, Paolo Bonzini ha scritto: > Would look a bit nicer with strstart() form cutils.c instead of > strncmp(). > >> > strstart() works with const char pointers, but I have char pointers here > >> > which I ne

Re: [Qemu-devel] [PATCH v7 5/5] block: Support GlusterFS as a QEMU block backend.

2012-09-20 Thread Paolo Bonzini
Il 20/09/2012 09:53, Paolo Bonzini ha scritto: Would look a bit nicer with strstart() form cutils.c instead of strncmp(). >> > strstart() works with const char pointers, but I have char pointers here >> > which I need to modify. > You can pass a char* to a function that accepts const char*. I

Re: [Qemu-devel] [PATCH v7 5/5] block: Support GlusterFS as a QEMU block backend.

2012-09-20 Thread Paolo Bonzini
Il 20/09/2012 08:41, Bharata B Rao ha scritto: >> > Would look a bit nicer with strstart() form cutils.c instead of strncmp(). > strstart() works with const char pointers, but I have char pointers here > which I need to modify. You can pass a char* to a function that accepts const char*. In your

Re: [Qemu-devel] [PATCH v7 5/5] block: Support GlusterFS as a QEMU block backend.

2012-09-19 Thread Bharata B Rao
On Tue, Sep 18, 2012 at 04:01:58PM +0200, Kevin Wolf wrote: > > + > > +#define GLUSTER_TRANSPORT_DEFAULT"gluster://" > > +#define GLUSTER_TRANSPORT_DEFAULT_SZ strlen(GLUSTER_TRANSPORT_DEFAULT) > > +#define GLUSTER_TRANSPORT_TCP"gluster+tcp://" > > +#define GLUSTER_TRANSPORT_

Re: [Qemu-devel] [PATCH v7 5/5] block: Support GlusterFS as a QEMU block backend.

2012-09-18 Thread Kevin Wolf
Am 17.09.2012 17:26, schrieb Bharata B Rao: > block: Support GlusterFS as a QEMU block backend. > > From: Bharata B Rao > > This patch adds gluster as the new block backend in QEMU. This gives > QEMU the ability to boot VM images from gluster volumes. Its already > possible to boot from VM image

[Qemu-devel] [PATCH v7 5/5] block: Support GlusterFS as a QEMU block backend.

2012-09-17 Thread Bharata B Rao
block: Support GlusterFS as a QEMU block backend. From: Bharata B Rao This patch adds gluster as the new block backend in QEMU. This gives QEMU the ability to boot VM images from gluster volumes. Its already possible to boot from VM images on gluster volumes using FUSE mount, but this patchset p