Martin Betak has posted comments on this change.

Change subject: backend: Add HostDev passthrough support #2
......................................................................


Patch Set 16:

(3 comments)

https://gerrit.ovirt.org/#/c/37619/16//COMMIT_MSG
Commit Message:

Line 25: RefreshHostDevicesCommand, and ProcessDownVmCommand.
Line 26: 
Line 27: Also added treatment in InitBackendServicesOnStartupBean to refresh 
host devices
Line 28: when engine restarts.
Line 29: 
> please add bug number and wiki url
Done
Line 30: Change-Id: I93c746cdda71678f7840d37683b890080a74341d


https://gerrit.ovirt.org/#/c/37619/16/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java:

Line 1891:             getLockManager().releaseLock(context.getLock());
Line 1892:             log.info("Lock freed to object '{}'", context.getLock());
Line 1893:             context.withLock(null);
Line 1894:             // free other locks here to guarantee they will be freed 
only once
Line 1895:             freeUnmanagedLocks();
> i dont understand why we need this extension to the infrastructure
I was looking for appropriate place to put the release of host device lock. And 
given the various paths a command execution can end this seemed to me the 
safest place. Thanks to the fact that we are under the same check as 
context.getLock() we should(?) have guarantee that this will be called at most 
once. And since I didn't want to put anything host-dev specific to CommandBase 
I made this a general purpose hook.
Line 1896:         }
Line 1897:     }
Line 1898: 
Line 1899:     /** hook for subclasses that hold additional custom locks */


https://gerrit.ovirt.org/#/c/37619/16/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java:

Line 137:     @Override
Line 138:     protected void postConstruct() {
Line 139:         super.postConstruct();
Line 140: 
Line 141:         needsHostDevices = 
hostDeviceManager.checkVmNeedsHostDevices(getVm());
> getVm() can be null
Done
Line 142:         acquireHostDevicesLock();
Line 143:     }
Line 144: 
Line 145:     @Override


-- 
To view, visit https://gerrit.ovirt.org/37619
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I93c746cdda71678f7840d37683b890080a74341d
Gerrit-PatchSet: 16
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Martin Betak <[email protected]>
Gerrit-Reviewer: Martin Polednik <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Shahar Havivi <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to