<br><br><div class="gmail_quote">On Wed, Jul 18, 2012 at 9:21 PM, Bharata B Rao <span dir="ltr">&lt;<a href="mailto:bharata.rao@gmail.com" target="_blank">bharata.rao@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, Jul 18, 2012 at 10:35 PM, Anand Avati &lt;<a href="mailto:anand.avati@gmail.com">anand.avati@gmail.com</a>&gt; wrote:<br>
&gt; Why do you want to re-init an already existing object?<br>
<br>
</div>As you note below, I don&#39;t want to re-init but rather do fini and init :)<br>
<div class="im"><br></div></blockquote><div><br></div><div>My question came from a different angle. glfs_fini() will be destroying the entire object. You need to get hold of a new object with glfs_new() and do glfs_init() on the new object. I see no real reason in providing a glfs_fini() api which will result in partial destruction of glfs_t and also lets you to glfs_init() on it again. You might as well leave the glfs_t as-is and avoid an extra glfs_init() for the second access.</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
&gt; Rather, why do you<br>
&gt; want to fini an object which you know you will init again? There is a cost<br>
&gt; to establishing and tearing down glfs_t. Why not initialize it once and use<br>
&gt; it for the lifetime of the process?<br>
<br>
</div>I agree, but the short answer is that for protocols like gluster where<br>
I am not required to specify any image format,  QEMU ends up opening<br>
the image twice which results in connection init and termination<br>
twice.<br>
<br></blockquote><div><br></div><div>As I said, why not just use a new glfs_t for the second access attempt?</div><br></div><div class="gmail_quote">Avati</div>