Hi,
I think I've found a bug in SSHFS:
- I can create hardlinks over SSHFS, but by default, stat then reports
different inodes for the original file and the hardlink!
(This behavior is very strange by itself, and I would consider it a
bug by itself, since it breaks the definition of a hardlink.)
- "-o use_ino" should fix this, but when I try to mount with this
option, the mount seems to fail silently (no error-message, mounted
according to "mount", but there are no files).
This should be fixed, so that either hardlinks work correctly (and stat
reports the same inode-numbers for hardlinks), or that sshfs fails when
trying to create a hardlink.
Note: This e.g. means that you cannot use mutt with maildirs over sshfs
anymore, since mutt tries to hardlink a file and then compares the
inodes; and if they don't match, mutt will hang/loop and create
thousands (or more) of hardlinks until mutt is killed.
(Related Debian-bug-number: #778801)
Tested with SSHFS on Debian (both Wheezy/stable and testing):
- SSHFS version 2.4
FUSE library version: 2.9.0
fusermount version: 2.9.0
using FUSE kernel interface version 7.18
- SSHFS version 2.5
FUSE library version: 2.9.3
fusermount version: 2.9.3
using FUSE kernel interface version 7.19
Steps to reproduce:
$ mkdir ~/testdir
$ echo foo > ~/testdir/bar
$ sshfs user@localhost:/home/user/testdir ~/mnt/
$ ll ~/mnt/
total 4
-rw-rw---- 1 rk rk 4 Feb 20 13:15 bar
$ fusermount -u ~/mnt/
$ sshfs user@localhost:/home/user/testdir ~/mnt/ -o use_ino
$ ll ~/mnt/
total 0
$ mount
...
user@localhost:/home/user/testdir on /home/user/mnt type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
$ fusermount -u ~/mnt/
Best regards
Roland
|