cgofuse: extract and refactor path locker #24
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Maybe it's better, maybe it's worse, maybe I broke it.
Still a work in progress.
Draft notes:
Since we're not currently using any file systems that modify data, it's hard to know if this is actually implemented correctly.
This needs to be finished, and tests need to be written to validate it.
At the very least, I haven't (yet) seen a deadlock or other problems on the read-only interfaces.
Go file systems that implement write methods (and FUSE wrappers for them) are currently being worked on.
They'll be using + building on this variant of the code. And the changes will be brought back into this branch as they happen.
Every FUSE operations must call these methods, so it's a valid optimization target.
Benchmarks would be nice to have, but that can potentially come later.
The code is intended to be easier to understand than the previous version.
It's hard to say if this got easier or harder to understand due to the abstraction choices used to reduce repetition.
So documentation and clarity within the code itself is going to have to be inspected and probably refined.
Tangentially related to #19