<div dir="ltr"><div>This also tells us that the gfapi based validation/QE testcases needs to take this scenario in to account<br>so that in future this can be caught sooner :)<br><br></div><div>Bharata,<br></div><div>    Does the existing QEMU testcase for gfapi cover this ?<br>
</div><div><br></div>thanx,<br>deepak<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 18, 2014 at 8:23 PM, Soumya Koduri <span dir="ltr">&lt;<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Posted my comments in the bug link.<br>
<br>
&quot; glfs_init&quot; cannot be called before as it checks for cmds_args-&gt;volfile_server which is initialized only in &quot;glfs_set_volfile_server&quot;.<br>
As Deepak had mentioned, we should either define a new routine to do the cleanup incase of init not done or rather modify &quot;glfs_fini&quot; to handle this special case as well which is better approach IMO as it wouldn&#39;t involve any changes in the applications using libgfapi.<br>

<br>
Thanks,<br>
Soumya<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
----- Original Message -----<br>
From: &quot;Bharata B Rao&quot; &lt;<a href="mailto:bharata.rao@gmail.com">bharata.rao@gmail.com</a>&gt;<br>
To: &quot;Deepak Shetty&quot; &lt;<a href="mailto:dpkshetty@gmail.com">dpkshetty@gmail.com</a>&gt;<br>
Cc: &quot;Gluster Devel&quot; &lt;<a href="mailto:gluster-devel@nongnu.org">gluster-devel@nongnu.org</a>&gt;<br>
Sent: Friday, April 18, 2014 8:31:28 AM<br>
Subject: Re: [Gluster-devel] Behaviour of glfs_fini() affecting QEMU<br>
<br>
On Thu, Apr 17, 2014 at 7:56 PM, Deepak Shetty &lt; <a href="mailto:dpkshetty@gmail.com">dpkshetty@gmail.com</a> &gt; wrote:<br>
<br>
<br>
<br>
<br>
The glfs_lock indeed seems to work only when glfs_init is succesfull!<br>
We can call glfs_unset_volfile_server for the error case of glfs_set_volfile_server as a good practice.<br>
But it does look like we need a opposite of glfs_new (maybe glfs_destroy) for cases like these to clenaup stuff that glfs_new() allocated<br>
<br>
thats my 2 cents... hope to hear from other gluster core folks on this<br>
<br>
There is a launchpad bug tracking this at <a href="https://bugs.launchpad.net/qemu/+bug/1308542" target="_blank">https://bugs.launchpad.net/qemu/+bug/1308542</a><br>
<br>
Regards,<br>
Bharata.<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@nongnu.org">Gluster-devel@nongnu.org</a><br>
<a href="https://lists.nongnu.org/mailman/listinfo/gluster-devel" target="_blank">https://lists.nongnu.org/mailman/listinfo/gluster-devel</a><br>
</div></div></blockquote></div><br></div>