<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 15 December 2016 at 18:07, Xavier Hernandez <span dir="ltr">&lt;<a href="mailto:xhernandez@datalab.es" target="_blank">xhernandez@datalab.es</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 12/15/2016 12:48 PM, Raghavendra Gowdappa wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I need to step back a little to understand the RCA correctly.<br>
<br>
If I understand the code correctly, the callstack which resulted in failed setattr is (in rebalance process):<br>
<br>
dht_lookup -&gt; dht_lookup_cbk -&gt; dht_lookup_everwhere -&gt; dht_lookup_everywhere_cbk -&gt; dht_lookup_everywhere_done -&gt; dht_linkfile_create -&gt; dht_lookup_linkfile_create_cbk -&gt; dht_linkfile_attr_heal -&gt; setattr<br>
<br>
However, this setattr doesn&#39;t change the file type.<br>
<br>
&lt;dht_linkfile_attr_heal&gt;<br>
<br>
        STACK_WIND (copy, dht_linkfile_setattr_cbk, subvol,<br>
                    subvol-&gt;fops-&gt;setattr, &amp;copy_local-&gt;loc,<br>
                    &amp;stbuf, (GF_SET_ATTR_UID | GF_SET_ATTR_GID), xattr);<br>
<br>
&lt;/dht_linkfile_attr_heal&gt;<br>
<br>
As can be seen above, the setattr call only changes UID/GID. So, I am at loss to explain why the file type changed. Has anyone has any other explanation?<br>
</blockquote>
<br></span>
Does the inode passed to setattr represent the regular file just created ? or does it contain information about the previous file (the one it&#39;s being replaced) that in this case is a symbolic link ?<br>
<br></blockquote><div>Right, IIUC, the reason this fails is the inode for the actual sym link has type LINK which does not match the stbuf returned in the setattr on the linkto file. The file does _not_ change types. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Xavi<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
regards,<br>
Raghavendra<br>
<br>
</blockquote>
<br>
</blockquote></div><br></div></div>