<div dir="ltr"><div>Since <a href="http://nongnu.org">nongnu.org</a> was down, I don&#39;t see the below mail (avati&#39;s and soumya&#39;s response) for this mail thread.<br></div>Surpsingly these are not seen in either the <a href="http://nongnu.org">nongnu.org</a> or <a href="http://gluster.org">gluster.org</a> archives!<br>
<br>Hence fwding it here in the hope that others can see it.<br><div><div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Bharata B Rao</b> <span dir="ltr">&lt;<a href="mailto:bharata.rao@gmail.com">bharata.rao@gmail.com</a>&gt;</span><br>
Date: Fri, Apr 25, 2014 at 3:03 PM<br>Subject: Fwd: [Gluster-devel] Behaviour of glfs_fini() affecting QEMU<br>To: Deepak Shetty &lt;<a href="mailto:dpkshetty@gmail.com">dpkshetty@gmail.com</a>&gt;<br><br><br><div dir="ltr">
<br><br><div class="gmail_quote"><div class="">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Soumya Koduri</b> <span dir="ltr">&lt;<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a>&gt;</span><br>

Date: Fri, Apr 25, 2014 at 12:44 PM<br>Subject: Re: [Gluster-devel] Behaviour of glfs_fini() affecting QEMU<br></div>To: Anand Avati &lt;<a href="mailto:avati@gluster.org" target="_blank">avati@gluster.org</a>&gt;<br>Cc: Bharata B Rao &lt;<a href="mailto:bharata.rao@gmail.com" target="_blank">bharata.rao@gmail.com</a>&gt;, &quot;Gluster Devel <a href="mailto:pgurusid@redhat.com" target="_blank">pgurusid@redhat.com</a>&quot; &lt;<a href="mailto:gluster-devel@nongnu.org" target="_blank">gluster-devel@nongnu.org</a>&gt;<br>

<br><br>Hi Anand,<br>
<br>
Sure. We will then take care of entire cleanup in &quot;glfs_fini()&quot; itself.<br>
<br>
Thanks,<br>
Soumya<div class=""><div><br>
<br>
On 04/25/2014 11:57 AM, Anand Avati wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><div>
Hi Soumya,<br>
<br>
Let&#39;s have just one cleanup API (which is already called glfs_fini)<br>
which handles all cases (whether or not glfs_init() was called, whether<br>
or not it was successful) and frees up all resources. Not only is it a<br>
bad idea to ask existing applications to make changes to their programs<br>
to accommodate a new API, it is just too much hassle to make cleanup<br>
anything more than a single API call.<br>
<br>
<br>
<br>
On Wed, Apr 23, 2014 at 10:00 AM, Soumya Koduri &lt;<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a><br></div></div><div class=""><div>
&lt;mailto:<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a>&gt;&gt; wrote:<br>
<br>
    Hi Bharata,<br>
<br>
    A quick update on this . In the current implementation, we are not<br>
    cleaning up all the memory allocated via &quot;glfs_new&quot; routine (in<br>
    &quot;glfs_fini&quot; i.e, even when glfs_init was done). So after a couple of<br>
    discussions, we have decided to first define a counter cleanup<br>
    routine for glfs_new (may be glfs_destroy as Deepak had suggested)<br>
    to cleanup that memory - Poornima has started working on this and<br>
    then take a call on to whether<br>
<br>
    * modify glfs_fini itself to detect the init_not_done cases ( Note -<br>
    looks like this check is not so straightforward. We need to come up<br>
    with some method to detect such scenarios) and do the necessary<br>
    cleanup which would mean no changes on the gfapi clients side.<br>
    or<br>
    * document and ask the gfapi clients to update their code and call<br>
    glfs_destroy incase of such failures as suggested by Deepak. This<br>
    seems much cleaner way to address the problem now.<br>
<br>
    Meanwhile can you please comment on how would it impact Qemu if it<br>
    needs to make an additional call to the libgfapi for the cleanup.<br>
<br>
    Thanks,<br>
    Soumya<br>
<br>
<br>
    ----- Original Message -----<br></div></div><div class=""><div>
    From: &quot;Deepak Shetty&quot; &lt;<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a> &lt;mailto:<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a>&gt;&gt;<br>
    To: &quot;Soumya Koduri&quot; &lt;<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a> &lt;mailto:<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a>&gt;&gt;<br>
    Cc: &quot;Bharata B Rao&quot; &lt;<a href="mailto:bharata.rao@gmail.com" target="_blank">bharata.rao@gmail.com</a><br></div></div><div class=""><div>
    &lt;mailto:<a href="mailto:bharata.rao@gmail.com" target="_blank">bharata.rao@gmail.com</a>&gt;<u></u>&gt;, &quot;Gluster Devel&quot;<br>
    &lt;<a href="mailto:gluster-devel@nongnu.org" target="_blank">gluster-devel@nongnu.org</a> &lt;mailto:<a href="mailto:gluster-devel@nongnu.org" target="_blank">gluster-devel@nongnu.<u></u>org</a>&gt;&gt;<br>
    Sent: Sunday, April 20, 2014 11:59:40 PM<br>
    Subject: Re: [Gluster-devel] Behaviour of glfs_fini() affecting QEMU<br>
<br>
    One more late thought...<br>
        Maybe this should show up as &quot;known issues&quot; in the recently released<br>
    gluster 3.5 beta and 3.5 GA release notes (unless fixed, then it<br>
    shud show<br></div></div>
    up in FAQs on <a href="http://gluster.org" target="_blank">gluster.org</a> &lt;<a href="http://gluster.org" target="_blank">http://gluster.org</a>&gt;)<div class=""><div><br>
<br>
    Can someone from gluster release mgmt take note of this pls ?<br>
<br>
    thanx,<br>
    deepak<br>
<br>
<br>
    On Sun, Apr 20, 2014 at 11:57 PM, Deepak Shetty &lt;<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a><br></div></div><div class=""><div>
    &lt;mailto:<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a>&gt;&gt; wrote:<br>
<br>
     &gt; This also tells us that the gfapi based validation/QE testcases<br>
    needs to<br>
     &gt; take this scenario in to account<br>
     &gt; so that in future this can be caught sooner :)<br>
     &gt;<br>
     &gt; Bharata,<br>
     &gt;     Does the existing QEMU testcase for gfapi cover this ?<br>
     &gt;<br>
     &gt; thanx,<br>
     &gt; deepak<br>
     &gt;<br>
     &gt;<br>
     &gt; On Fri, Apr 18, 2014 at 8:23 PM, Soumya Koduri<br></div></div><div class=""><div>
    &lt;<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a> &lt;mailto:<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a>&gt;&gt; wrote:<br>
     &gt;<br>
     &gt;&gt; Posted my comments in the bug link.<br>
     &gt;&gt;<br>
     &gt;&gt; &quot; glfs_init&quot; cannot be called before as it checks for<br>
     &gt;&gt; cmds_args-&gt;volfile_server which is initialized only in<br>
     &gt;&gt; &quot;glfs_set_volfile_server&quot;.<br>
     &gt;&gt; As Deepak had mentioned, we should either define a new routine<br>
    to do the<br>
     &gt;&gt; cleanup incase of init not done or rather modify &quot;glfs_fini&quot; to<br>
    handle this<br>
     &gt;&gt; special case as well which is better approach IMO as it wouldn&#39;t<br>
    involve<br>
     &gt;&gt; any changes in the applications using libgfapi.<br>
     &gt;&gt;<br>
     &gt;&gt; Thanks,<br>
     &gt;&gt; Soumya<br>
     &gt;&gt;<br>
     &gt;&gt;<br>
     &gt;&gt; ----- Original Message -----<br>
     &gt;&gt; From: &quot;Bharata B Rao&quot; &lt;<a href="mailto:bharata.rao@gmail.com" target="_blank">bharata.rao@gmail.com</a><br></div></div><div class=""><div>
    &lt;mailto:<a href="mailto:bharata.rao@gmail.com" target="_blank">bharata.rao@gmail.com</a>&gt;<u></u>&gt;<br>
     &gt;&gt; To: &quot;Deepak Shetty&quot; &lt;<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a><br></div></div><div class=""><div>
    &lt;mailto:<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a>&gt;&gt;<br>
     &gt;&gt; Cc: &quot;Gluster Devel&quot; &lt;<a href="mailto:gluster-devel@nongnu.org" target="_blank">gluster-devel@nongnu.org</a><br></div></div><div class=""><div>
    &lt;mailto:<a href="mailto:gluster-devel@nongnu.org" target="_blank">gluster-devel@nongnu.<u></u>org</a>&gt;&gt;<br>
     &gt;&gt; Sent: Friday, April 18, 2014 8:31:28 AM<br>
     &gt;&gt; Subject: Re: [Gluster-devel] Behaviour of glfs_fini() affecting QEMU<br>
     &gt;&gt;<br>
     &gt;&gt; On Thu, Apr 17, 2014 at 7:56 PM, Deepak Shetty &lt;<br></div></div>
    <a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a> &lt;mailto:<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a>&gt; &gt;<div class=""><div><br>
     &gt;&gt; wrote:<br>
     &gt;&gt;<br>
     &gt;&gt;<br>
     &gt;&gt;<br>
     &gt;&gt;<br>
     &gt;&gt; The glfs_lock indeed seems to work only when glfs_init is<br>
    succesfull!<br>
     &gt;&gt; We can call glfs_unset_volfile_server for the error case of<br>
     &gt;&gt; glfs_set_volfile_server as a good practice.<br>
     &gt;&gt; But it does look like we need a opposite of glfs_new (maybe<br>
    glfs_destroy)<br>
     &gt;&gt; for cases like these to clenaup stuff that glfs_new() allocated<br>
     &gt;&gt;<br>
     &gt;&gt; thats my 2 cents... hope to hear from other gluster core folks<br>
    on this<br>
     &gt;&gt;<br>
     &gt;&gt; There is a launchpad bug tracking this at<br>
     &gt;&gt; <a href="https://bugs.launchpad.net/qemu/+bug/1308542" target="_blank">https://bugs.launchpad.net/<u></u>qemu/+bug/1308542</a><br>
     &gt;&gt;<br>
     &gt;&gt; Regards,<br>
     &gt;&gt; Bharata.<br>
     &gt;&gt;<br>
     &gt;&gt; ______________________________<u></u>_________________<br>
     &gt;&gt; Gluster-devel mailing list<br></div></div>
     &gt;&gt; <a href="mailto:Gluster-devel@nongnu.org" target="_blank">Gluster-devel@nongnu.org</a> &lt;mailto:<a href="mailto:Gluster-devel@nongnu.org" target="_blank">Gluster-devel@nongnu.<u></u>org</a>&gt;<div>
<br>
     &gt;&gt; <a href="https://lists.nongnu.org/mailman/listinfo/gluster-devel" target="_blank">https://lists.nongnu.org/<u></u>mailman/listinfo/gluster-devel</a><br>
     &gt;&gt;<br>
     &gt;<br>
     &gt;<br>
<br>
    ______________________________<u></u>_________________<br>
    Gluster-devel mailing list<br></div>
    <a href="mailto:Gluster-devel@nongnu.org" target="_blank">Gluster-devel@nongnu.org</a> &lt;mailto:<a href="mailto:Gluster-devel@nongnu.org" target="_blank">Gluster-devel@nongnu.<u></u>org</a>&gt;<br>
    <a href="https://lists.nongnu.org/mailman/listinfo/gluster-devel" target="_blank">https://lists.nongnu.org/<u></u>mailman/listinfo/gluster-devel</a><br>
<br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><a href="http://raobharata.wordpress.com/" target="_blank">http://raobharata.wordpress.com/</a>
</font></span></div>
</div><br></div></div></div>