-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR makes `Buffer` operations stricter: reads and writes now panic if we try to access a `Buffer` without block alignment. To make this less dangerous, the relevant functions are changed from pub to pub(crate), so they can't be called from the public API. Propolis only uses `Buffer::new and `Buffer::as_vec`, so that shouldn't be an issue. Within `crucible-upstairs`, I had to update the implementation of `IOSpan` to do read-modify-write operations; previously, three unit tests would panic under the strict regime.
- Loading branch information
Showing
2 changed files
with
141 additions
and
17 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