block: qcow: Add read support for zero bit in L2 entries#7627
Merged
likebreath merged 2 commits intocloud-hypervisor:mainfrom Jan 22, 2026
Merged
block: qcow: Add read support for zero bit in L2 entries#7627likebreath merged 2 commits intocloud-hypervisor:mainfrom
likebreath merged 2 commits intocloud-hypervisor:mainfrom
Conversation
Implement read support for bit 0 in QCOW2 L2 table entries. When this flag is set, the cluster reads as zeros without accessing disk. This improves compatibility with QCOW2 images that use this optimization. According to the QCOW2 specification, bit 0 of the standard cluster descriptor indicates that the cluster reads as zeros. Unlike l2_entry == 0 indicating a completely unallocated entry, bit 0 can be set on an allocated cluster. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
Add test for l2_entry_is_zero() and related helper functions. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
9cb223d to
e51a596
Compare
phip1611
approved these changes
Jan 22, 2026
likebreath
approved these changes
Jan 22, 2026
Merged
via the queue into
cloud-hypervisor:main
with commit Jan 22, 2026
eaafe42
42 of 43 checks passed
liuw
added a commit
to liuw/cloud-hypervisor
that referenced
this pull request
Feb 10, 2026
Since kernel commit 6693731487a8 ("vsock/virtio: Allocate nonlinear SKBs
for handling large transmit buffers"), a large vsock packet can be split
into multiple descriptors.
If we encounter such TX packets, pull the content into an owned buffer.
Fixes: cloud-hypervisor#7627
Signed-off-by: Wei Liu <liuwe@microsoft.com>
liuw
added a commit
to liuw/cloud-hypervisor
that referenced
this pull request
Feb 10, 2026
Since kernel commit 6693731487a8 ("vsock/virtio: Allocate nonlinear SKBs
for handling large transmit buffers"), a large vsock packet can be split
into multiple descriptors.
If we encounter such TX packets, pull the content into an owned buffer.
Fixes: cloud-hypervisor#7627
Signed-off-by: Wei Liu <liuwe@microsoft.com>
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.
Implements support for bit 0 in QCOW2 v3 L2 table entries. When set, the cluster reads as zeros without disk access, improving compatibility with QCOW2 images using this optimization.