Kanagaraj M has posted comments on this change.

Change subject: gluster:Support Striped_replicate volume types
......................................................................


Patch Set 7: Looks good to me, but someone else must approve

(1 inline comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateGlusterVolumeCommand.java
Line 319:             }
Line 320:             if (replicaCount < 2) {
Line 321:                 
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_REPLICA_COUNT_MIN_2);
Line 322:                 return false;
Line 323:             }
I would prefer moving these min replica/stripe count check out of switch to 
avoid repeating them. Something like

 if (volume.getVolumeType().isReplicated() && replicaCount < 2) {
   addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_REPLICA_COUNT_MIN_2);
 }

same goes for stripe as well.
Line 324:             if ( brickCount <= stripeCount * replicaCount || 
Math.IEEEremainder(brickCount, stripeCount * replicaCount) != 0) {
Line 325:                 
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_INVALID_BRICK_COUNT_FOR_DISTRIBUTED_STRIPED_REPLICATE);
Line 326:                 return false;
Line 327:             }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I517c1e9e41f1bb68626d5a8a45d679208934d98f
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sahina Bose <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to