Source:
<code>private void performDiskUpdate(final boolean unlockImage) { if (shouldPerformMetadataUpdate()) { updateMetaDataDescription((DiskImage) getNewDisk()); } final Disk disk = getDiskDao().get(getParameters().getDiskId()); applyUserChanges(disk); TransactionSupport.executeInNewTransaction(new TransactionMethod<Object>() { @Override public Object runInTransaction() { getVmStaticDAO().incrementDbGeneration(getVm().getId()); updateDeviceProperties(); getBaseDiskDao().update(disk); if (disk.getDiskStorageType() == DiskStorageType.IMAGE) { DiskImage diskImage = (DiskImage) disk; diskImage.setQuotaId(getQuotaId()); if (unlockImage && diskImage.getImageStatus() == ImageStatus.LOCKED) { diskImage.setImageStatus(ImageStatus.OK); } getImageDao().update(diskImage.getImage()); updateQuota(diskImage); updateDiskProfile(); } else if (disk.getDiskStorageType() == DiskStorageType.LUN) { updateLunProperties((LunDisk)getNewDisk()); } else { <START> log.error("Unexpected <END> disk storage type ..."); } clearDeviceAddressIfNeeded(); reloadDisks(); updateBootOrder(); setSucceeded(true); return null; } private void updateDeviceProperties() { if (updateReadOnlyRequested()) { vmDeviceForVm.setIsReadOnly(getNewDisk().getReadOnly()); getVmDeviceDao().update(vmDeviceForVm); } } private void updateLunProperties(LunDisk lunDisk) { vmDeviceForVm.setUsingScsiReservation(lunDisk.isUsingScsiReservation()); getVmDeviceDao().update(vmDeviceForVm); } private void clearDeviceAddressIfNeeded() { if (getOldDisk().getDiskInterface() != getNewDisk().getDiskInterface()) { getVmDeviceDao().clearDeviceAddress(getOldDisk().getId()); } } }); }</code><technical_language>I reason add this else, if decided add it, in execute phase in CDA phase prompt a proper message user</technical_language>

Target:
private void performDiskUpdate(final boolean unlockImage) { if (shouldPerformMetadataUpdate()) { updateMetaDataDescription((DiskImage) getNewDisk()); } final Disk disk = getDiskDao().get(getParameters().getDiskId()); applyUserChanges(disk); TransactionSupport.executeInNewTransaction(new TransactionMethod<Object>() { @Override public Object runInTransaction() { getVmStaticDAO().incrementDbGeneration(getVm().getId()); updateDeviceProperties(); getBaseDiskDao().update(disk); if (disk.getDiskStorageType() == DiskStorageType.IMAGE) { DiskImage diskImage = (DiskImage) disk; diskImage.setQuotaId(getQuotaId()); if (unlockImage && diskImage.getImageStatus() == ImageStatus.LOCKED) { diskImage.setImageStatus(ImageStatus.OK); } getImageDao().update(diskImage.getImage()); updateQuota(diskImage); updateDiskProfile(); } else if (disk.getDiskStorageType() == DiskStorageType.LUN) { updateLunProperties((LunDisk)getNewDisk()); } clearDeviceAddressIfNeeded(); reloadDisks(); updateBootOrder(); setSucceeded(true); return null; } private void updateDeviceProperties() { if (updateReadOnlyRequested()) { vmDeviceForVm.setIsReadOnly(getNewDisk().getReadOnly()); getVmDeviceDao().update(vmDeviceForVm); } } private void updateLunProperties(LunDisk lunDisk) { vmDeviceForVm.setUsingScsiReservation(lunDisk.isUsingScsiReservation()); getVmDeviceDao().update(vmDeviceForVm); } private void clearDeviceAddressIfNeeded() { if (getOldDisk().getDiskInterface() != getNewDisk().getDiskInterface()) { getVmDeviceDao().clearDeviceAddress(getOldDisk().getId()); } } }); }