block: Allow (and ignore) FLUSH requests on read-only devices#7706
Merged
rbradford merged 1 commit intocloud-hypervisor:mainfrom Feb 14, 2026
Merged
block: Allow (and ignore) FLUSH requests on read-only devices#7706rbradford merged 1 commit intocloud-hypervisor:mainfrom
rbradford merged 1 commit intocloud-hypervisor:mainfrom
Conversation
rbradford
approved these changes
Feb 14, 2026
rbradford
reviewed
Feb 14, 2026
| fn check_request(features: u64, request_type: RequestType) -> result::Result<(), ExecuteError> { | ||
| if has_feature(features, VIRTIO_BLK_F_RO.into()) | ||
| && !(request_type == RequestType::In || request_type == RequestType::GetDeviceId) | ||
| && !(request_type == RequestType::In |
Member
There was a problem hiding this comment.
Yes the spec says only write requests (which I interpret to being discard too) that this should apply to.
rbradford
approved these changes
Feb 14, 2026
OVMF sends FLUSH requests to read-only virtio-block devices. Refusing these requests prevents OVMF from accessing the EFI System Partition and therefore makes VMs unable to boot. Accept these requests instead. them. Ignoring these requests is possible, but inconsistent with fsync(2) which honors them. Fixes: cloud-hypervisor#7698 Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
Contributor
Author
|
Force-pushed to fix commit message. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OVMF sends FLUSH requests to read-only virtio-block devices. Refusing these requests prevents OVMF from accessing the EFI System Partition and therefore makes VMs unable to boot. Accept these requests instead. them.
Ignoring these requests is possible, but inconsistent with fsync(2) which honors them.
Fixes: #7698