Skip to content
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

[WIP] MFS improvements #4515

Closed
wants to merge 4 commits into from
Closed

[WIP] MFS improvements #4515

wants to merge 4 commits into from

Conversation

Stebalien
Copy link
Member

  • 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).
  • Simpler mode/access checks.
  • Fix MFS: Race when reading node and taking read/write lock #4514 (take the read/write lock before reading the file's node).
  • Syncing/flushing when we don't need to.

* Ensure we don't flush unnecessarily.
* Make it easier to work with modes.
* Better handle closed files.

License: MIT
Signed-off-by: Steven Allen <[email protected]>
Otherwise, it could be exchanged out from under us!

fixes #4514

License: MIT
Signed-off-by: Steven Allen <[email protected]>
This allows us to, e.g., get the size, etc. in parallel.

License: MIT
Signed-off-by: Steven Allen <[email protected]>
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 <[email protected]>
@ghost ghost assigned Stebalien Dec 21, 2017
@ghost ghost added the status/in-progress In progress label Dec 21, 2017
@Stebalien
Copy link
Member Author

TODO: Test the race.

@Stebalien Stebalien changed the title MFS improvements [WIP] MFS improvements Dec 21, 2017
@Stebalien
Copy link
Member Author

I think I'm going to take a different approach to modes.

@Stebalien Stebalien closed this Dec 21, 2017
@ghost ghost removed the status/in-progress In progress label Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant