-
Notifications
You must be signed in to change notification settings - Fork 472
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vfs: add SyncData,SyncTo,Preallocate to vfs.File
Expand the vfs.File interface to expose SyncData, SyncTo and Preallocate as first-class methods. Previously, the file created through vfs.NewSyncingFile would perform analagous I/O operations (eg, `Fdatasync`, `sync_file_range`, `Fallocate`) outside the context of the interface. This easily allowed the accidental loss of the disk-health checking over these operations by minor tweaks to the interface of the disk-health checking implementation or by adding intermediary VFS wrappers between the disk-health checking FS and the syncing file. See cockroachdb/cockroach#94373 where the introduction of an additional VFS wrapper resulted in these I/O operations being uncovered by disk-stall detection.
- Loading branch information
Showing
22 changed files
with
573 additions
and
327 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
Oops, something went wrong.