Emmanuel,<div>The Linux FUSE does not perform lookup() on &quot;..&quot; but instead looks up the parent of cwd&#39;s dentry within the kernel module itself. In 3.3 we changed the behavior to establish inode on a &quot;..&quot; lookup but neglect dentry establishment (since it will form a loop). You might want to backport 9bd1b291e3e107250b38d05702df7cd751382bdc to release-3.2 if NetBSD FUSE sends &quot;..&quot; lookup.<div>
<br></div><div>Avati<br><br><div class="gmail_quote">On Wed, Aug 8, 2012 at 9:51 PM, Emmanuel Dreyfus <span dir="ltr">&lt;<a href="mailto:manu@netbsd.org" target="_blank">manu@netbsd.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<br>
<br>
Test case: calling getcwd(3) in a directory on NetBSD<br>
- glusterfs release-3.3 has no problem<br>
- glusterfs 3.2.7 has a funny bug when a node TTL is expired *and* if<br>
the getcwd program is stored in the glusterfs volume.<br>
<br>
# cd /gfs/manu/bugB4 &amp;&amp; /gfs/manu/getcwd/getcwd &amp;&amp; sleep 2 &amp;&amp; \<br>
  /gfs/manu/getcwd/getcwd<br>
getcwd = &quot;/gfs/manu/bugB4&quot;<br>
getcwd = &quot;(null)&quot;<br>
<br>
# cd /gfs/manu/bugB4 &amp;&amp; /tmp/getcwd &amp;&amp; sleep 2 &amp;&amp; /tmp/getcwd<br>
getcwd = &quot;/gfs/manu/bugB4&quot;<br>
getcwd = &quot;/gfs/manu/bugB4&quot;<br>
<br>
When it fails the client logs say:<br>
[2012-08-09 06:45:37.338851] W [inode.c:180:__foreach_ancestor_dentry]<br>
    0-: per dentry fn returned 1<br>
[2012-08-09 06:45:37.339021] C [inode.c:232:__is_dentry_cyclic]<br>
    0-gfs/inode: detected cyclic loop formation during inode linkage.<br>
    inode (-5514238854638478444/20958215-feaa-4648-acde-5f3e8da776e5) l<br>
    linking under itself as ..<br>
[2012-08-09 06:45:37.339112] W [inode.c:844:inode_lookup]  0-: inode<br>
    not found<br>
<br>
Is that a bug in glusterfs 3.2.7 or an inaccuracy in NetBSD FUSE? Here<br>
is getcwd sources for anyone willing to test:<br>
<br>
/* cc -o getcwd getcwd.c */<br>
#include &lt;unistd.h&gt;<br>
#include &lt;stdio.h&gt;<br>
#include &lt;sys/param.h&gt;<br>
<br>
int<br>
main(void)<br>
{<br>
        char buf[MAXPATHLEN + 1];<br>
<br>
        (void)printf(&quot;getcwd = \&quot;%s\&quot;\n&quot;, getcwd(buf, MAXPATHLEN));<br>
<br>
        return 0;<br>
}<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Emmanuel Dreyfus<br>
<a href="http://hcpnet.free.fr/pubz" target="_blank">http://hcpnet.free.fr/pubz</a><br>
<a href="mailto:manu@netbsd.org">manu@netbsd.org</a><br>
<br>
_______________________________________________<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>
</font></span></blockquote></div><br></div></div>