-
Notifications
You must be signed in to change notification settings - Fork 14
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
Relaxed inUse definition #80
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good except for some minor naming/docs improvements
src/main/java/org/cryptomator/frontend/fuse/OpenFileFactory.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Sebastian Stenzel <overheadhunter@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo these two changes, the rest looks fine to me
src/main/java/org/cryptomator/frontend/fuse/ReadOnlyAdapter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/cryptomator/frontend/fuse/ReadOnlyAdapter.java
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
This PR also mitigates problems described in #79, but with a different approach. Instead of timing based staleness of opened files, we determine if the filesystem is "in use", if at least one open file exists, which was written to.
The idea behind this approach is to allow regular unmounting as long as no data loss happens on the filesystem. If an open file was written to, we require it to be properly closed by a
release()
call to letisInUse()
returnfalse
.