<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="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 class="HOEnZb"><div class="h5">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>