Dan Kenigsberg has posted comments on this change. Change subject: hostdev: add dynamic udev rule creation for iommu groups ......................................................................
Patch Set 6: (1 comment) http://gerrit.ovirt.org/#/c/36268/6/vdsm/hostdev.py File vdsm/hostdev.py: Line 142: Line 143: iommu_group = device_params['iommu_group'] Line 144: Line 145: if device_params['capability'] in _DETACH_REQUIRING_UDEV: Line 146: function_mapping[action].udev(iommu_group) > TL;DR: I would have no problem to admin my mistake if we need to add more and more code to the mirror-image code of dettach/reattach. but at the moment, the repetitive code is so much simple than the refactoring. Maybe we can think of a stack-like structure to abstract the reciprocal behavior of these two functions; something that allows nesting of __enter__s in one thread of execution, and __exit__s in another. Line 147: supervdsm.getProxy().udevTrigger(iommu_group) Line 148: Line 149: if device_params['capability'] in _DETACH_REQUIRING_CAPS: Line 150: function_mapping[action].libvirt() -- To view, visit http://gerrit.ovirt.org/36268 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieac8d58e01d7277e535a2101d522961816ea88eb Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Martin Polednik <[email protected]> Gerrit-Reviewer: Michal Skrivanek <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
