Maor Lipchuk has posted comments on this change.
Change subject: core: add the image block alignment scan
......................................................................
Patch Set 4: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ScanDiskAlignmentCommand.java
Line 43:
Line 44: public ScanDiskAlignmentCommand(T parameters) {
Line 45: super(parameters);
Line 46: }
Line 47:
Don't you want to use audit log when the command finished with success or not?
Line 48: @Override
Line 49: protected Map<String, Pair<String, String>> getExclusiveLocks() {
Line 50: if (isImageLockNeeded()) {
Line 51: return
Collections.singletonMap(getDisk().getId().toString(),
LockMessagesMatchUtil.DISK);
Line 124: Boolean isDiskAligned = (Boolean)
getBackend().getResourceManager()
Line 125: .RunVdsCommand(VDSCommandType.ScanDiskAlignment,
parameters).getReturnValue();
Line 126:
Line 127: getDisk().setAlignment(isDiskAligned ? DiskAlignment.Aligned
: DiskAlignment.Misaligned);
Line 128: getDisk().setLastAlignmentScan(new Date());
Don't you want to use only the date when the disk was aligned?
It seams that the success or failure of the operation should be reflected
through the audit log instead through the DB
Line 129:
Line 130: getBaseDiskDao().update(getDisk());
Line 131: setSucceeded(true);
Line 132:
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/BaseDisk.java
Line 73:
Line 74: private boolean boot;
Line 75:
Line 76: private DiskAlignment alignment;
Line 77: private Date lastAlignmentScan;
Do we want to search this attributes? probably should be added to the search of
disk.
Line 78:
Line 79: public BaseDisk() {
Line 80: }
Line 81:
--
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: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches