-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stat to use the fd instead of the path (#649)
* chore(deps): Upgrade to flume 0.11 Has a race condition fix for async APIs. Not sure if this actually impacts us but sounds like a worthwhile upgrade. * Add failing test cases (#648) Attempting to stat on an unlinked file will error with NotFound when it shouldn't since we still have the fd. Similarly, invoking stat on a tempfile will stat the parent directory instead of the file itself. * Fix stat() behavior to use the fd instead of the path This fixes the broken test cases - unlinked files will still stat successfully and temporary files will return stat for the file rather than the parent directory. There's probably a negligible performance boost since we don't need to do anything with the path (I believe it saves a memory allocation + some other cycles) + the kernel might have to do less work handling the syscall. Of course, stat should never be in the hot path so it's largely an academic difference.
- Loading branch information
Showing
7 changed files
with
69 additions
and
30 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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