-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow repeated readdir offsets (#581)
* Allow repeated readdir offsets POSIX allows seeking an open directory handle, which in FUSE means the `offset` can be any offset we've previously returned. This is pretty annoying for us to implement since we're streaming directory entries from S3 with ListObjects, which can't resume from an arbitrary index, and can't fit its continuation tokens into a 64-bit offset anyway. So we're probably never going to truly support seeking a directory handle. But there's a special case we've seen come up a couple of times (#477, #520): some applications read one page of directory entries and then seek back to 0 and do it again. I don't fully understand _why_ they do this, but it's common enough that it's worth special casing. This change makes open directory handles remember their most recent response so that they can repeat it if asked for the same offset again. It's not too complicated other than needing to make sure we do readdirplus correctly (managing the lookup counts for entries that are being returned a second time). I've tested this by running the PHP example from #477, which now works. Signed-off-by: James Bornholt <bornholt@amazon.com> * PR feedback Signed-off-by: James Bornholt <bornholt@amazon.com> * Changelog and docs Signed-off-by: James Bornholt <bornholt@amazon.com> --------- Signed-off-by: James Bornholt <bornholt@amazon.com>
- Loading branch information
1 parent
04f7499
commit 8e5688d
Showing
7 changed files
with
219 additions
and
83 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
Oops, something went wrong.
8e5688d
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.
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
2
.random_read_four_threads
7.51611328125
MiB/s15.94443359375
MiB/s2.12
random_read_direct_io
1.20576171875
MiB/s2.74296875
MiB/s2.27
random_read
1.14990234375
MiB/s2.5990234375
MiB/s2.26
This comment was automatically generated by workflow using github-action-benchmark.
8e5688d
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.
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
2
.random_read_four_threads
7.50205078125
MiB/s15.94443359375
MiB/s2.13
random_read_direct_io
1.2796875
MiB/s2.74296875
MiB/s2.14
This comment was automatically generated by workflow using github-action-benchmark.