<div dir="ltr"><div>Since <a href="http://nongnu.org">nongnu.org</a> was down, I don't see the below mail (avati's and soumya'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"><<a href="mailto:bharata.rao@gmail.com">bharata.rao@gmail.com</a>></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 <<a href="mailto:dpkshetty@gmail.com">dpkshetty@gmail.com</a>><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"><<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a>></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 <<a href="mailto:avati@gluster.org" target="_blank">avati@gluster.org</a>><br>Cc: Bharata B Rao <<a href="mailto:bharata.rao@gmail.com" target="_blank">bharata.rao@gmail.com</a>>, "Gluster Devel <a href="mailto:pgurusid@redhat.com" target="_blank">pgurusid@redhat.com</a>" <<a href="mailto:gluster-devel@nongnu.org" target="_blank">gluster-devel@nongnu.org</a>><br>
<br><br>Hi Anand,<br>
<br>
Sure. We will then take care of entire cleanup in "glfs_fini()" 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'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 <<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a><br></div></div><div class=""><div>
<mailto:<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a>>> 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 "glfs_new" routine (in<br>
"glfs_fini" 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: "Deepak Shetty" <<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a> <mailto:<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a>>><br>
To: "Soumya Koduri" <<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a> <mailto:<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a>>><br>
Cc: "Bharata B Rao" <<a href="mailto:bharata.rao@gmail.com" target="_blank">bharata.rao@gmail.com</a><br></div></div><div class=""><div>
<mailto:<a href="mailto:bharata.rao@gmail.com" target="_blank">bharata.rao@gmail.com</a>><u></u>>, "Gluster Devel"<br>
<<a href="mailto:gluster-devel@nongnu.org" target="_blank">gluster-devel@nongnu.org</a> <mailto:<a href="mailto:gluster-devel@nongnu.org" target="_blank">gluster-devel@nongnu.<u></u>org</a>>><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 "known issues" 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> <<a href="http://gluster.org" target="_blank">http://gluster.org</a>>)<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 <<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a><br></div></div><div class=""><div>
<mailto:<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a>>> wrote:<br>
<br>
> This also tells us that the gfapi based validation/QE testcases<br>
needs to<br>
> take this scenario in to account<br>
> so that in future this can be caught sooner :)<br>
><br>
> Bharata,<br>
> Does the existing QEMU testcase for gfapi cover this ?<br>
><br>
> thanx,<br>
> deepak<br>
><br>
><br>
> On Fri, Apr 18, 2014 at 8:23 PM, Soumya Koduri<br></div></div><div class=""><div>
<<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a> <mailto:<a href="mailto:skoduri@redhat.com" target="_blank">skoduri@redhat.com</a>>> wrote:<br>
><br>
>> Posted my comments in the bug link.<br>
>><br>
>> " glfs_init" cannot be called before as it checks for<br>
>> cmds_args->volfile_server which is initialized only in<br>
>> "glfs_set_volfile_server".<br>
>> As Deepak had mentioned, we should either define a new routine<br>
to do the<br>
>> cleanup incase of init not done or rather modify "glfs_fini" to<br>
handle this<br>
>> special case as well which is better approach IMO as it wouldn't<br>
involve<br>
>> any changes in the applications using libgfapi.<br>
>><br>
>> Thanks,<br>
>> Soumya<br>
>><br>
>><br>
>> ----- Original Message -----<br>
>> From: "Bharata B Rao" <<a href="mailto:bharata.rao@gmail.com" target="_blank">bharata.rao@gmail.com</a><br></div></div><div class=""><div>
<mailto:<a href="mailto:bharata.rao@gmail.com" target="_blank">bharata.rao@gmail.com</a>><u></u>><br>
>> To: "Deepak Shetty" <<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a><br></div></div><div class=""><div>
<mailto:<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a>>><br>
>> Cc: "Gluster Devel" <<a href="mailto:gluster-devel@nongnu.org" target="_blank">gluster-devel@nongnu.org</a><br></div></div><div class=""><div>
<mailto:<a href="mailto:gluster-devel@nongnu.org" target="_blank">gluster-devel@nongnu.<u></u>org</a>>><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 <<br></div></div>
<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a> <mailto:<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a>> ><div class=""><div><br>
>> wrote:<br>
>><br>
>><br>
>><br>
>><br>
>> The glfs_lock indeed seems to work only when glfs_init is<br>
succesfull!<br>
>> We can call glfs_unset_volfile_server for the error case of<br>
>> glfs_set_volfile_server as a good practice.<br>
>> But it does look like we need a opposite of glfs_new (maybe<br>
glfs_destroy)<br>
>> 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<br>
on this<br>
>><br>
>> There is a launchpad bug tracking this at<br>
>> <a href="https://bugs.launchpad.net/qemu/+bug/1308542" target="_blank">https://bugs.launchpad.net/<u></u>qemu/+bug/1308542</a><br>
>><br>
>> Regards,<br>
>> Bharata.<br>
>><br>
>> ______________________________<u></u>_________________<br>
>> Gluster-devel mailing list<br></div></div>
>> <a href="mailto:Gluster-devel@nongnu.org" target="_blank">Gluster-devel@nongnu.org</a> <mailto:<a href="mailto:Gluster-devel@nongnu.org" target="_blank">Gluster-devel@nongnu.<u></u>org</a>><div>
<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>
><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> <mailto:<a href="mailto:Gluster-devel@nongnu.org" target="_blank">Gluster-devel@nongnu.<u></u>org</a>><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>