Hi Amin,<br><br>please find inlined comments.<br><br><div class="gmail_quote">On Wed, Jul 22, 2009 at 3:47 PM, Amin Abbaspour <span dir="ltr">&lt;<a href="mailto:amin@raysaz.com">amin@raysaz.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi All,<br>
<br>
This is my first post in the dev list :)<br>
<br>
I wrote a methods to be triggered during release callback and added it<br>
to xlator_cbks struct in trace.c but this method is not invoked at<br>
all.<br>
<br>
I can see that some other performance xlators such as write-behind and<br>
read-ahead have similar callback handlers over release but but don&#39;t<br>
know why my method is not called.<br>
<br>
Is there any other config required besides setting release variable in<br>
xlator_cbks struct to my function pointer?<br>
<br>
I tried to set two others (releasedir and forget) but they are not<br>
called either. I suppose editing a file in vim should call release at<br>
the end. BTW my case is very similar to this issue in FUSE (<br>
<a href="http://www.nabble.com/No-release-callback-after-cp-td23050110.html" target="_blank">http://www.nabble.com/No-release-callback-after-cp-td23050110.html</a> )<br>
but I don&#39;t think there is any need for such a config in Gluster.</blockquote><div><br>You need to set some context related to trace in fd-&gt;ctx. Only xlators who have stored their contexts in fd, will have their cbks called. You can set context in fd from trace as,<br>
<br>fd_ctx_set (this, fd, 1);<br><br>Generally last argument will be a pointer to structure holding context of the translator. Here its just a dummy value.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Thanks for your help,<br>
Regards,<br>
<br>
Amin Abbaspour<br>
<br>
<br>
_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@nongnu.org">Gluster-devel@nongnu.org</a><br>
<a href="http://lists.nongnu.org/mailman/listinfo/gluster-devel" target="_blank">http://lists.nongnu.org/mailman/listinfo/gluster-devel</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Raghavendra G<br><br>