{{ message }}
Add more resiliency to disk image format handling#7728
Merged
likebreath merged 4 commits intocloud-hypervisor:mainfrom Feb 19, 2026
Merged
Add more resiliency to disk image format handling#7728likebreath merged 4 commits intocloud-hypervisor:mainfrom
likebreath merged 4 commits intocloud-hypervisor:mainfrom
Conversation
Member
rbradford
commented
Feb 19, 2026
- vmm: Improve resiliency of image type handling
- vmm, virtio-devices: Deny zero sector writes for autodetected raw images
- vhost_user_blk: Disable use of backing files in test implementation
- virtio-devices, block: Reject sector 0 discard/"write zeroes" requests
1a11d53 to
3cb6aac
Compare
Add an image_type to DiskConfig to specify the image type. If none is specified autodetect the image type but disable potentially unsafe behaviour in the QCOW2 backend by disabling the backing file support. If the image type is autodetected then fix it in the config so that it will be persistant across reboots and migrations/snapshot & restores. This also handles the case where the image type was not specified as part of the disk configuration. Signed-off-by: Rob Bradford <rbradford@meta.com>
If the disk image was autodetected to raw (not specified with image_type = 0) then in the virtio-block subsystem generate errors for writes to block 0 (treat as if read-only). This gives an immediate error vs using the image implementations in the block subsystem. Signed-off-by: Rob Bradford <rbradford@meta.com>
Remove the use of QCOW2 backing files in the test implementation used for CI. Signed-off-by: Rob Bradford <rbradford@meta.com>
As well as rejecting writes to sector 0 in the case of raw files where the user hasn't specified the image_type also reject virtio requests of type discard and write_zeroes. Signed-off-by: Rob Bradford <rbradford@meta.com>
3cb6aac to
a33bfb4
Compare
likebreath
approved these changes
Feb 19, 2026
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.
