Are you sure the problem is the creation of the symlink itself and not the attempt to set GFID on the symlink (where linux sets the xattr on the symlink itself while NetBSD sets the xattr on the target?)<div><br></div><div>
Avati<br><br><div class="gmail_quote">On Sat, Jun 2, 2012 at 9:48 AM, 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">
I tracked down this problem this problem on release-3.3/NetBSD<br>
<br>
Test case, that seems to work fine:<br>
<br>
$ ln -s a b<br>
$ ls -l b<br>
lrwxrwxrwx  0 manu  manu  1 Jun  2 17:46 b -&gt; a<br>
<br>
But on bricks logs:<br>
<br>
[2012-06-02 17:49:26.920400] W [posix-handle.c:461:posix_handle_hard]<br>
0-pfs-posix: link /export/wd3a/manu/symlink/b -&gt;<br>
/export/wd3a/.glusterfs/db/1e/db1e7f6f-78d4-4701-82dd-e90e6801db31<br>
failed (No such file or directory)<br>
[2012-06-02 17:49:26.920484] E [posix.c:1277:posix_symlink] 0-pfs-posix:<br>
setting gfid on /export/wd3a/manu/symlink/b failed<br>
<br>
This is because link(2) is done with a symlink target, and the symlink<br>
leads to nowhere. BSD link(2) first resolves the symlink and get ENOENT.<br>
Linux link(2) operates on the symlink itself, not its target, and works.<br>
<br>
Both behavior are standard compliant. The only way to work this around<br>
in a portable way is to use newer standard function linkat(2), which<br>
allow the caller to specify if symlinks must be followed or not.<br>
<br>
Here is the change that fixes the above problem. Please approve and<br>
merge! <a href="http://review.gluster.com/3507" target="_blank">http://review.gluster.com/3507</a><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>