-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shared storage flag causes getcwd to fail #584
Comments
Hi, thanks for the report, could you try latest master? We have better caching now, and as a part of that the directory handling has been refactored. As for the increasing inode number, this is expected, and prevents hard links from being detected (possibly incorrectly due to concurrent modifications) |
Hello @rfjakob I tested again with
|
Another interesting case with
|
I did a little more digging. I see that Perhaps changing
|
Thanks for the analysis! Yes that explains it. The unstable inode number breaks the pwd algorithm. Actually, directories cannot have hard links, so I could make those stable. That the ino of . and .. are stable is strange. |
Interstingly, I cannot reproduce this here. "/tmp/plain" is the mountpoint:
"strace /usr/bin/pwd" shows:
in other words, pwd asked the kernel instead of doing the ino comparison itself. But why doesn't your pwd do that? |
I can repro now (don't know why):
strace:
|
I found a much better way to disable hard links, preserving the original inode numbers. This should also fix the getcwd problem. |
@rfjakob Thanks for the quick fix! I'll try out master and see how things go. I utilize gocryptfs + syncthing (and have other backups just in case something goes horribly wrong) for lots of my system state, and this should make the experience much better. |
When utilizing the
-sharedstorage
flag creating a new shell inside a nested directory causesgetcwd
/pwd
to start failing. This very specifically seems to be a problem with the first level of directories inside a decrypted directory. It does not happen with deeper directories. It does not happen without-sharedstorage
. In my testing I used a totally freshgocryptfs -init
test bed that was not shared with anything like syncthing. This happens with bothbash
andsh
.Version:
gocryptfs v2.0.1; go-fuse [vendored]; 2021-06-07 go1.16.5 linux/amd64
Here is an example:
The text was updated successfully, but these errors were encountered: