Allon Mureinik has posted comments on this change.

Change subject: core: add the image block alignment scan
......................................................................


Patch Set 6: I would prefer that you didn't submit this

(3 inline comments)

Looks fine to me other than the transaction management issue Liron commented on.

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ScanDiskAlignmentCommand.java
Line 65: 
Line 66:     @Override
Line 67:     protected Map<String, Pair<String, String>> getSharedLocks() {
Line 68:         if (getDisk() != null && !isImageExclusiveLockNeeded()) {
Line 69:             return 
Collections.singletonMap(getDisk().getId().toString(), 
LockMessagesMatchUtil.DISK);
@Liron, ins't that what LockMessagesMatchUtil.DISK does?
Line 70:         }
Line 71:         return null;
Line 72:     }
Line 73: 


Line 189:                 }});
Line 190:         }
Line 191:     }
Line 192: 
Line 193:     protected void releaseExclusiveDiskLocks() {
I think the term "exclusive locks" is a bit missleading (confusing with 
getExclusiveLocks()).
Perhaps rename this to acquierDbLocks and releaseDbLocks ?
Line 194:         if (isImageExclusiveLockNeeded()) {
Line 195:             final DiskImage diskImage = (DiskImage) getDisk();
Line 196: 
Line 197:             diskImage.setImageStatus(ImageStatus.OK);


Line 216:     }
Line 217: 
Line 218:     protected Guid getVdsIdInPool() {
Line 219:         if (vdsInPool == null && getStoragePoolId() != null) {
Line 220:             for (VDS vds : getVdsDAO().getAllForStoragePoolAndStatus(
@Liron - what do you suggest?
Line 221:                         getStoragePoolId(), VDSStatus.Up)) {
Line 222:                 vdsInPool = vds.getId();
Line 223:                 break; // At the moment we select the first VDS in Up 
status
Line 224:             }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4858b7bbfa453230fcafecfbc5358c715d5d825b
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@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>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to