-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose virtual size of qcow2 backing images
This commit adds VirtualSize to the BackingImage, BackingImageStatus, BackingImageSpec and FileInfo structs. This will allow longhorn-manager to in turn pick up the virtual image size and expose it in the status section of the BackingImage and BackingImageManager CRDs. The virtual size of an image is determined by running `qemu-img info`. For qcow2 images, the virtual size will usually be larger than the actual physical file size. For raw images, `qemu-img info` still reports virtual size, but it's the same as the physical file size in this case. It's important to note that we can only report the virtual size of an image once the syncing file is ready. If the syncing file is not yet ready (or if for some reason the call to `qemu-img info` fails), virtual size will be set to zero. Related issue: longhorn/longhorn#7923 Signed-off-by: Tim Serong <[email protected]>
- Loading branch information
Showing
7 changed files
with
387 additions
and
218 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
Large diffs are not rendered by default.
Oops, something went wrong.
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