<div dir="ltr"><div>ok, now stopped at fuse_setattr_cbk, here is a bit of my session with gdb:<br>(gdb) p op_ret<br>$1 = 0<br>(gdb) p op_errno<br>$2 = 0<br>(gdb) p *statpost<br>$3 = {ia_ino = 9708385387769469648, ia_gfid = &quot;\r(H\266\237\347H*\206\273\035\022\254\227\232\320&quot;, ia_dev = 1206432852, ia_type = IA_IFLNK, ia_prot = {suid = 0 &#39;\000&#39;, sgid = 0 &#39;\000&#39;, sticky = 0 &#39;\000&#39;,<br>    owner = {read = 1 &#39;\001&#39;, write = 1 &#39;\001&#39;, exec = 1 &#39;\001&#39;}, group = {read = 1 &#39;\001&#39;, write = 1 &#39;\001&#39;, exec = 1 &#39;\001&#39;}, other = {read = 1 &#39;\001&#39;, write = 1 &#39;\001&#39;, exec = 1 &#39;\001&#39;}}, ia_nlink = 0,<br>  ia_uid = 0, ia_gid = 0, ia_rdev = 1099511562495, ia_size = 71, ia_blksize = 4096, ia_blocks = 1, ia_atime = 1445755399, ia_atime_nsec = 635070168, ia_mtime = 1444602630, ia_mtime_nsec = 578330000,<br>  ia_ctime = 1444602468, ia_ctime_nsec = 558067808}<br>(gdb) p *statp<br>$4 = {ia_ino = 9708385387769469648, ia_gfid = &quot;\r(H\266\237\347H*\206\273\035\022\254\227\232\320&quot;, ia_dev = 1206432852, ia_type = IA_IFLNK, ia_prot = {suid = 0 &#39;\000&#39;, sgid = 0 &#39;\000&#39;, sticky = 0 &#39;\000&#39;,<br>    owner = {read = 1 &#39;\001&#39;, write = 1 &#39;\001&#39;, exec = 1 &#39;\001&#39;}, group = {read = 1 &#39;\001&#39;, write = 1 &#39;\001&#39;, exec = 1 &#39;\001&#39;}, other = {read = 1 &#39;\001&#39;, write = 1 &#39;\001&#39;, exec = 1 &#39;\001&#39;}}, ia_nlink = 0,<br>  ia_uid = 0, ia_gid = 0, ia_rdev = 1099511562495, ia_size = 71, ia_blksize = 4096, ia_blocks = 1, ia_atime = 1445755086, ia_atime_nsec = 307072106, ia_mtime = 1444602630, ia_mtime_nsec = 578330000,<br>  ia_ctime = 1444602468, ia_ctime_nsec = 558067808}<br><br><br></div><div>In order to track this down, I tried setting printing out the error value every time a message is written to the kernel.  it was never non-zero.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 23, 2015 at 2:04 PM, Marty Rosenberg <span dir="ltr">&lt;<a href="mailto:marty.rosenberg@gmail.com" target="_blank">marty.rosenberg@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 dir="ltr">Sure, I think I&#39;ve set a breakpoint there before, and nothing looked awry, but I&#39;ll do that when I get home.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 23, 2015 at 1:57 PM, Vijay Bellur <span dir="ltr">&lt;<a href="mailto:vbellur@redhat.com" target="_blank">vbellur@redhat.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><div>On Friday 23 October 2015 07:28 AM, Marty Rosenberg wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
First off: I&#39;ve based my work off of the release of 3.7.3, since it was<br>
the most recent release when I started this project, and I couldn&#39;t get<br>
HEAD to build on freebsd. (I&#39;m using a freebsd server, and linux clients)<br>
<br>
I realize that many things will be broken by doing this (renaming open<br>
files, deleting open files, possibly some other stuff), but I can live<br>
with those limitations.<br>
<br>
What I&#39;ve done:<br>
  I&#39;ve modified the code to failback to a symlink if making a hardlink<br>
fails (which it will do somewhat frequently due to being on a different<br>
filesystem).<br>
I created an extended property on symlinks that are emulating hard links<br>
changed the setattr code to check this before it tries to set the<br>
attributs, and if it is set, it dereferences the link, then proceeds<br>
with the setattr<br>
<br>
To test this, I made a file, and ran chmod +x on it<br>
the good: attributes were correctly set on the file!<br>
the bad: chmod says it failed with EIO<br>
my issue: I have no clue where this EIO is coming from.  Under the<br>
hood,s chmod is calling fchmodat<br>
<br>
After no luck with printf debugging, I just ran gluster under gdb, and<br>
set a breakpoint on send_fuse_iov.  Here&#39;s the backtrace:<br>
#0  send_fuse_iov (this=0x63a150, finh=0x7fffe0005fe0,<br>
iov_out=0x7ffff08e7500, count=2) at fuse-bridge.c:158<br>
#1  0x00007ffff550fcfd in send_fuse_data (this=0x63a150,<br>
finh=0x7fffe0005fe0, data=0x7ffff08e75a0, size=104) at fuse-bridge.c:197<br>
#2  0x00007ffff5511be1 in fuse_attr_cbk (frame=0x7fffe000145c,<br>
cookie=0x7fffe000616c, this=0x63a150, op_ret=0, op_errno=117,<br>
buf=0x7fffe0006734, xdata=0x0) at fuse-bridge.c:734<br>
</blockquote>
<br>
<br></div></div>
Can you break at fuse_setattr_cbk() and check the backtrace? That could provide more relevant information for the chmod failure.<br>
<br>
Regards,<br>
Vijay<br>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>