qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3] block/gluster: add support for multiple glu


From: Prasanna Kumar Kalever
Subject: Re: [Qemu-devel] [PATCH 3/3] block/gluster: add support for multiple gluster servers
Date: Thu, 5 Nov 2015 07:45:50 -0500 (EST)

On Thursday, November 5, 2015 6:07:06 PM, Prasanna Kumar Kalever wrote:
> This patch adds a way to specify multiple volfile servers to the gluster
> block backend of QEMU with tcp|rdma transport types and their port numbers.
> 
> Problem:
> 
> Currently VM Image on gluster volume is specified like this:

[...]

>  static void qemu_gluster_complete_aio(void *opaque)
>  {
>      GlusterAIOCB *acb = (GlusterAIOCB *)opaque;
> @@ -309,13 +641,13 @@ static void qemu_gluster_parse_flags(int bdrv_flags,
> int *open_flags)
>      }
>  }
>  
> -static int qemu_gluster_open(BlockDriverState *bs, QDict *options,
> +static int qemu_gluster_open(BlockDriverState *bs,  QDict *options,
>                               int bdrv_flags, Error **errp)
>  {
>      BDRVGlusterState *s = bs->opaque;
>      int open_flags = 0;
>      int ret = 0;
> -    GlusterConf *gconf = g_new0(GlusterConf, 1);
> +    BlockdevOptionsGluster *gconf = NULL;
>      QemuOpts *opts;
>      Error *local_err = NULL;
>      const char *filename;
> @@ -329,8 +661,7 @@ static int qemu_gluster_open(BlockDriverState *bs, QDict
> *options,
>      }
>  
>      filename = qemu_opt_get(opts, "filename");
> -
> -    s->glfs = qemu_gluster_init(gconf, filename, errp);
> +    s->glfs = qemu_gluster_init(&gconf, filename, options, errp);
>      if (!s->glfs) {
>          ret = -errno;
>          goto out;
> @@ -345,7 +676,7 @@ static int qemu_gluster_open(BlockDriverState *bs, QDict
> *options,
>  
>  out:
>      qemu_opts_del(opts);
> -    qemu_gluster_gconf_free(gconf);
> +    qapi_free_BlockdevOptionsGluster(gconf);

Can some one help me please ?
This leads to crash in the second iteration i.e. while freeing 
"gconf->servers->next->value"

-prasanna 

>      if (!ret) {
>          return ret;
>      }

[...]

> --
> 2.1.0
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]