[OpenAFS] hardlinks, sftp, and returning EXDEV

Derrick Brashear shadow@gmail.com
Tue, 11 Dec 2007 23:04:53 -0500


------=_Part_28289_11820453.1197432293831
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Dec 11, 2007 6:37 PM, Mike Garrison <mcgarr@umich.edu> wrote:

> So I have a question regarding hardlinks.
>
> I know that hardlinks work properly if they are in the same directory.
> I know it fails if it's to a different directory hierarchy. When you
> attempt to do a hard link across directory boundaries, it returns:
> EXDEV (Invalid cross-device link)
>
> This breaks OpenSSH's sftp if you are attempting to move files. A
> rename of './blah/testfile' to './testing' will result in a failure.
> Essentially, you can't move files around. You can only rename them in
> the same directory via sftp.
>
> I can see returning EXDEV for links across a VOLUME, since then you're
> going across devices, but why does OpenAFS return EXDEV for stuff on
> the same volume? Is there a reason that EXDEV instead of, say
> EOPNOTSUPP?
>

Most things (mv) usefully handle EXDEV; Basically nothing handles
EOPNOTSUPP.

------=_Part_28289_11820453.1197432293831
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<br><br><div class="gmail_quote">On Dec 11, 2007 6:37 PM, Mike Garrison &lt;<a href="mailto:mcgarr@umich.edu">mcgarr@umich.edu</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
So I have a question regarding hardlinks.<br><br>I know that hardlinks work properly if they are in the same directory.<br>I know it fails if it&#39;s to a different directory hierarchy. When you<br>attempt to do a hard link across directory boundaries, it returns:
<br>EXDEV (Invalid cross-device link)<br><br>This breaks OpenSSH&#39;s sftp if you are attempting to move files. A<br>rename of &#39;./blah/testfile&#39; to &#39;./testing&#39; will result in a failure.<br>Essentially, you can&#39;t move files around. You can only rename them in
<br>the same directory via sftp.<br><br>I can see returning EXDEV for links across a VOLUME, since then you&#39;re<br>going across devices, but why does OpenAFS return EXDEV for stuff on<br>the same volume? Is there a reason that EXDEV instead of, say
<br>EOPNOTSUPP?<br></blockquote><div><br>Most things (mv) usefully handle EXDEV; Basically nothing handles EOPNOTSUPP.<br><br><br></div></div><br>

------=_Part_28289_11820453.1197432293831--