[OpenAFS] hardlinks, sftp, and returning EXDEV

Mike Garrison mcgarr@umich.edu
Tue, 11 Dec 2007 18:37:50 -0500

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  

Mike Garrison