-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISO images by default are uploaded as Raw/Thin Provision. And if you … #963
ISO images by default are uploaded as Raw/Thin Provision. And if you … #963
Conversation
6ed3a7e
to
65cd243
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This branch has conflicts that must be resolved
65cd243
to
5885b92
Compare
@sandrobonazzola |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be rewritten more shortly.
VolumeFormat.COW : getImageInfoModel().getFormat(); | ||
diskImage.setVolumeFormat(volumeFormat); | ||
DiskContentType contentType = getImageInfoModel().getContentType(); | ||
if (volumeFormat != VolumeFormat.COW && contentType == DiskContentType.ISO) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just add the additional if:
if (diskImage.getVolumeFormat() != VolumeFormat.COW && getImageInfoModel().getContentType() == DiskContentType.ISO) {
diskImage.setVolumeType(VolumeType.Preallocated);
}
And skip the other changes :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dupondje Thanks for the suggestion.
I applied the changes (with additional comments).
Could you please review once more?
Thanks in advance.
…later move such disk to a block storage (FC/iSCSI) then it will be converted to Cow/Thin Provision. And this might corrupt the disk. To avoid this issue we suggested to always upload ISO images as Raw/Preallocated. In this case no conversion needed while moving to a block storage. And disk works fine in both types (block and non-block) storages. Signed-off-by: Stepan Ermakov <sermakov@orionsoft.ru>
5885b92
to
75c88cf
Compare
ISO images by default are uploaded as Raw/Thin Provision. And if you later move such disk to a block storage (FC/iSCSI) then it will be converted to Cow/Thin Provision. And this might corrupt the disk. To avoid this issue we suggested to always upload ISO images as Raw/Preallocated. In this case no conversion needed while moving to a block storage. And disk works fine in both types (block and non-block) storages.
Are you the owner of the code you are sending in, or do you have permission of the owner?
y