-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fs: handle interrupted readdir(plus)
As of commit 1f60fbe7 "ext4: allow readdir()'s of large empty directories to be interrupted" (Apr 23, 2016), the Linux kernel allows readdir operations to be interrupted. When this happens on a FUSE request, typically only the first direntry is processed, and a subsequent read will re-request the same segment of direntries less one. This leads to sporadic failures in the tests, as the Go runtime uses SIGURG to interrupt long-running goroutines, and some tests do not use loopbackDirStream (which supports seeking). For example: TestReaddirplusParallel. Since most directory implementations don't support seeking, handle these resumed reads transparently, by buffering the result of the last readdir(plus) call. Change-Id: I9f57a17671e572c2e00dfe38e274867de518ef12
- Loading branch information
Showing
1 changed file
with
46 additions
and
8 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