Allon Mureinik has posted comments on this change. Change subject: core:Import VM should not be blocked when collapse. ......................................................................
Patch Set 2: I would prefer that you didn't submit this (4 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java Line 415: public static boolean checkImageConfiguration(storage_domain_static storageDomain, Line 416: DiskImageBase diskInfo, List<String> messages, boolean isCopyCollapse) { Line 417: boolean result = true; Line 418: if ((diskInfo.getvolume_type() == VolumeType.Preallocated && diskInfo.getvolume_format() == VolumeFormat.COW) Line 419: || !isCopyCollapse && isVolTypeAndFormatSupportedByBlockDevice(storageDomain, diskInfo) I know && takes precedence on ||, but adding brackets will really improve readability here. Line 420: || (diskInfo.getvolume_format() == VolumeFormat.Unassigned || diskInfo.getvolume_type() == VolumeType.Unassigned)) { Line 421: // not supported Line 422: result = false; Line 423: messages.add(VdcBllMessages.ACTION_TYPE_FAILED_DISK_CONFIGURATION_NOT_SUPPORTED.toString()); Line 424: } Line 425: return result; Line 426: } Line 427: Line 428: private static boolean isVolTypeAndFormatSupportedByBlockDevice(storage_domain_static storageDomain, the name does not convey what this method does. how about "isDiskAllowedOnStorageDoamin()"? Line 429: DiskImageBase diskInfo) { Line 430: return (storageDomain.getstorage_type() == StorageType.FCP || storageDomain.getstorage_type() == StorageType.ISCSI) && (diskInfo Line 431: .getvolume_type() == VolumeType.Sparse && diskInfo.getvolume_format() == VolumeFormat.RAW); Line 432: } .................................................... Commit Message Line 5: CommitDate: 2012-09-05 17:47:25 +0300 Line 6: Line 7: core:Import VM should not be blocked when collapse. Line 8: Line 9: Import VM with disks to block-device domain, will not be blocked for s/,// Line 10: images which have sparse volume type and RAW volume format, Line 11: if user sends copy collapse option as true. Line 12: Line 13: Block-Device does not support RAW sparse volumes, so disk with snapshot Line 13: Block-Device does not support RAW sparse volumes, so disk with snapshot Line 14: can not be imported to ISCSI domain. Line 15: If user will choose to copy collapse the image then the volume will Line 16: become cow sparse or raw preallocated (Depends on the user decision), Line 17: which are supported by to be used in a block-device domain. s/by to be used in a block-device domain/by the target block-device domain/ Line 18: Line 19: Signed-off-by: Maor Lipchuk <mlipc...@redhat.com> -- To view, visit http://gerrit.ovirt.org/7756 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic6f4b762fbd9770c5157fee6b24373fa9a0dca10 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Ayal Baron <aba...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches