<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body bgcolor="#FFFFFF" fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">That worked! Thanks!<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="widows:2; text-transform:none; text-indent:0px; letter-spacing:normal; font:13px Tahoma; white-space:normal; orphans:2; color:rgb(0,0,0); word-spacing:0px">
<font size="1">-</font></div>
<div style="widows:2; text-transform:none; text-indent:0px; letter-spacing:normal; font:13px Tahoma; white-space:normal; orphans:2; color:rgb(0,0,0); word-spacing:0px">
<div><font size="1"></font></div>
<font size="1">Ben Jeurissen, Ph.D.</font></div>
<div style="widows:2; text-transform:none; text-indent:0px; letter-spacing:normal; font-style:normal; font-variant:normal; font-size:13px; line-height:normal; font-family:Tahoma; white-space:normal; orphans:2; word-spacing:0px">
<div style="font-weight:normal; color:rgb(0,0,0)"><font size="1">Post-doctoral researcher</font></div>
<div style="font-weight:normal; color:rgb(0,0,0)"><font size="1">Vision Lab, Dept. of Physics</font></div>
<div style="font-weight:normal; color:rgb(0,0,0)"><font size="1">University of Antwerp</font></div>
<div><font size="1">Universiteitsplein 1, N.1.18</font></div>
<div style="font-weight:normal; color:rgb(0,0,0)"><font size="1">B-2610 Wilrijk, Belgium</font></div>
<div><font size="1">Phone: &#43;32 3 265 24 77</font></div>
<div style="font-weight:normal; color:rgb(0,0,0)"><font size="1">Email: ben.jeurissen@uantwerpen.be</font></div>
<div style="font-weight:normal; color:rgb(0,0,0)"><font size="1">Url:&nbsp;<a href="http://visielab.ua.ac.be/people/ben-jeurissen" target="_blank">http://visielab.ua.ac.be/people/ben-jeurissen</a></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF657663" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Ravishankar N [ravishankar@redhat.com]<br>
<b>Sent:</b> 18 July 2014 09:14<br>
<b>To:</b> Willem Jan Palenstijn; gluster-users@gluster.org<br>
<b>Cc:</b> Jeurissen Ben<br>
<b>Subject:</b> Re: [Gluster-users] unexpected ENOENT on symlinks<br>
</font><br>
</div>
<div></div>
<div>
<div class="moz-cite-prefix">On 07/17/2014 07:44 PM, Willem Jan Palenstijn wrote:<br>
</div>
<blockquote type="cite">
<pre>Hi,

I'm running into unexpected behaviour with symlinks on a glusterfs volume
(3.5.1 on Arch Linux), where sometimes accessing a symlink on the volume
results in ENOENT (No such file or directory).

The following consistently reproduces it for me from a shell. At the end of
this post I've also included a short snippet of C that shows this inconsistency
between repeated readlink() syscalls.


$ ln -s x y
$ ls -al
ls: cannot read symbolic link y: No such file or directory
total 16
drwxr-xr-x 2 wjp wjp 4096 Jul 17 15:40 .
drwx------ 7 wjp wjp 4096 Jul 17 15:40 ..
lrwxrwxrwx 1 wjp wjp    1 Jul 17 15:40 y
$ ls -l y
lrwxrwxrwx 1 wjp wjp 1 Jul 17 15:40 y -&gt; x


Is this indeed unexpected, and if so, what would be a good next step to
investigate this?

The setup is glusterfs 3.5.1 on Arch Linux, with a stripe glusterfs volume
consisting of two bricks.
</pre>
</blockquote>
<br>
Hi Willem,<br>
<a class="moz-txt-link-freetext" href="http://review.gluster.org/#/c/8153/" target="_blank">http://review.gluster.org/#/c/8153/</a> fixes the
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=1111454" target="_blank">issue</a>. It should be available in the 3.5.2 release.<br>
Thanks,<br>
Ravi<br>
<br>
<blockquote type="cite">
<pre>Thanks,
Willem Jan



----

$ gcc -o t test_glusterfs_symlink.c &amp;&amp; ./t
First readlink: -1 (errno 2)
Second readlink: 1

$ cat test_glusterfs_symlink.c 
#include &lt;unistd.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;sys/stat.h&gt;
#include &lt;stdio.h&gt;
#include &lt;dirent.h&gt;
#include &lt;errno.h&gt;

int main()
{
        FILE *f;
        int r1, r2, r3, e2, e3;
        struct dirent *p;
        DIR *d;
        char buf[2];
        struct stat s;

        r1 = symlink(&quot;x&quot;, &quot;y&quot;);
        if (r1 != 0) {
                printf(&quot;Failed to create symlink\n&quot;);
                return -1;
        }

        d = opendir(&quot;.&quot;);
        p = readdir(d);

        r2 = readlink(&quot;y&quot;, buf, 2);
        e2 = errno;
        r3 = readlink(&quot;y&quot;, buf, 2);
        e3 = errno;

        printf(&quot;First readlink: %d&quot;, r2);
        if (r2 &lt; 0) printf(&quot; (errno %d)&quot;, e2);
        printf(&quot;\nSecond readlink: %d&quot;, r3);
        if (r3 &lt; 0) printf(&quot; (errno %d)&quot;, e3);
        printf(&quot;\n&quot;);

        unlink(&quot;y&quot;);

        return 0;
}


_______________________________________________
Gluster-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a>
<a class="moz-txt-link-freetext" href="http://supercolony.gluster.org/mailman/listinfo/gluster-users" target="_blank">http://supercolony.gluster.org/mailman/listinfo/gluster-users</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
</body>
</html>