-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[WIP] MFS improvements #4517
Closed
Closed
[WIP] MFS improvements #4517
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
Stebalien
commented
Dec 21, 2017
•
edited
Loading
edited
- Avoid syncing/flushing after closing an fd.
- Avoid reading/writing after closing an fd.
- Use a rw lock to guard the file's node (allows concurrent size checks).
- Improve flags and mode. Make file open options an extensible struct. Unix uses an int because it's easier to pass in a syscall and it has a fixed size. We don't care about that.
- Fix MFS: Race when reading node and taking read/write lock #4514 (take the read/write lock before reading the file's node).
- Avoid syncing/flushing when we don't need to.
* Ensure we don't flush unnecessarily. * Make it easier to work with modes/flags. * Better handle closed files. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
Otherwise, it could be exchanged out from under us! fixes #4514 License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
This allows us to, e.g., get the size, etc. in parallel. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
Technically, the sync could fail. If it does, we don't want to allow syncing *again* without the write lock held. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
763d804
to
50a8dce
Compare
50a8dce
to
f4dc9a4
Compare
This was referenced Feb 26, 2018
Closed
4 tasks
This code has been moved to |
nitishm
pushed a commit
to nitishm/go-mfs
that referenced
this pull request
Dec 25, 2018
Pulled changes from ipfs/kubo#4517, on top of, ipfs#45. Change added to unblock the `waitPub()` call. With the elimination of stateSync cause a `updateChildEntry` to happen for `stateFlushed` as well, causing it to propogate upwards to the parent(s) [fullSync] and force a publish to happen, hence unblocking `waitPub`.
nitishm
pushed a commit
to nitishm/go-mfs
that referenced
this pull request
Dec 30, 2018
Pulled changes from ipfs/kubo#4517, on top of, ipfs#45. Change added to unblock the `waitPub()` call. With the elimination of stateSync cause a `updateChildEntry` to happen for `stateFlushed` as well, causing it to propogate upwards to the parent(s) [fullSync] and force a publish to happen, hence unblocking `waitPub`.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
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.