Tal Nisan has posted comments on this change.

Change subject: core: allow read-only for VirtIO-SCSI DirectLUN disks
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.ovirt.org/#/c/30123/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/DiskValidator.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/DiskValidator.java:

Line 108:                         String.format("$interface %1$s", 
diskInterface));
Line 109:             }
Line 110: 
Line 111:             boolean isVirtioScsiDirectLunPassthrough = diskInterface 
== DiskInterface.VirtIO_SCSI &&
Line 112:                     disk.getDiskStorageType() == DiskStorageType.LUN 
&& disk.isScsiPassthrough();
Can't you just check is disk.isScsiPassthrough()?
If the rest of the condition has to be true otherwise you'll get thrown before 
with the validation failure
Line 113:             if (isVirtioScsiDirectLunPassthrough) {
Line 114:                 return new 
ValidationResult(VdcBllMessages.SCSI_PASSTHROUGH_IS_NOT_SUPPORTED_FOR_READ_ONLY_DISK);
Line 115:             }
Line 116:         }


-- 
To view, visit http://gerrit.ovirt.org/30123
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic317722be9ef8978b50352c12bc06ea8c906dcd0
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Eyal Edri <ee...@redhat.com>
Gerrit-Reviewer: Paolo Bonzini <pbonz...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
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

Reply via email to