Martin Betak has posted comments on this change. Change subject: backend: Add HostDev passthrough support #3 ......................................................................
Patch Set 21: (1 comment) https://gerrit.ovirt.org/#/c/37619/21/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdev/RefreshHostDevicesCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdev/RefreshHostDevicesCommand.java: Line 87: } Line 88: } Line 89: Line 90: try { Line 91: hostDeviceManager.acquireHostDevicesLock(getVdsId()); > so it means no lock is needed here at all? Alona is right that we no longer need the vdsm reporting of vm_id in host devices since we maintain the consistency of device allocation. But regardless of that, the lock is needed here because even though this update runs in one transaction, in RunVmCommand we check the device availability in canDoAction and then later in execute we mark devices as used. We do not want this treatment to be run in between those actions and interfere with RunVmCommand. Line 92: TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { Line 93: @Override Line 94: public Void runInTransaction() { Line 95: hostDeviceDao.saveAllInBatch(newDevices); -- 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: 21 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: Moti Asayag <[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
