Sergey Gotliv has posted comments on this change. Change subject: core, restapi: Introducing support for attaching disk snapshot ......................................................................
Patch Set 31: (1 comment) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java Line 249: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_RESIZE_DISK_SNAPSHOT); Line 250: } Line 251: } Line 252: Line 253: if (shouldResizeDiskImage()) { Ok, I want to improve my previous comment: Line 244 - potential ClassCastException if we update direct LUN? Previously it was protected by calling shouldResizeDiskImage() which check that this is an image in CDA. Line 253 - there is no reason to call shouldResize.... here this is too late to check if this is an image, we already know that snpshotId == null because of line 246 so all we have to check is if newSize is different than old. Line 254: DiskImage oldDiskImage = (DiskImage) getOldDisk(); Line 255: Line 256: if (oldDiskImage.getSize() > newDiskImage.getSize()) { Line 257: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_REQUESTED_DISK_SIZE_IS_TOO_SMALL); -- To view, visit http://gerrit.ovirt.org/17679 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I02579bf1a91cd294a5040acf432f1fdb87eb18c1 Gerrit-PatchSet: 31 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Alissa Bonas <abo...@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: Federico Simoncelli <fsimo...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches