Dan Kenigsberg has posted comments on this change. Change subject: vdsm: add check for hostdev passthrough to caps ......................................................................
Patch Set 5: Code-Review-1 (4 comments) http://gerrit.ovirt.org/#/c/30471/5//COMMIT_MSG Commit Message: Line 3: AuthorDate: 2014-07-19 01:31:13 +0200 Line 4: Commit: Martin Polednik <[email protected]> Line 5: CommitDate: 2014-09-03 14:33:20 +0200 Line 6: Line 7: vdsm: add check for hostdev passthrough to caps vdsm prefix is superfluous. Line 8: Line 9: Not perfectly accurate source but the support for passthrough can be Line 10: obtained through cmdline of dmesg, or systemd journal in fedora. Line 11: This indicates whether user *wanted* to enable the support, not if Line 8: Line 9: Not perfectly accurate source but the support for passthrough can be Line 10: obtained through cmdline of dmesg, or systemd journal in fedora. Line 11: This indicates whether user *wanted* to enable the support, not if Line 12: it is fully supported by hardware and/or configuration. isn't there a saner way, by reading sysfs? Line 13: Line 14: Change-Id: I789f93679740e87b2f5a88351261bc58852990d4 http://gerrit.ovirt.org/#/c/30471/5/vdsm/caps.py File vdsm/caps.py: Line 254: return False Line 255: Line 256: Line 257: def _has_iommu_support(): Line 258: with open('/proc/cmdline', 'r') as fd: the return value of open() is a file, not a file descriptor. So 'fd' is a misleading name. Line 259: cmdline = fd.readline() Line 260: if _has_iommu_support_in_cmdline(cmdline): Line 261: return 'yes' Line 262: else: Line 257: def _has_iommu_support(): Line 258: with open('/proc/cmdline', 'r') as fd: Line 259: cmdline = fd.readline() Line 260: if _has_iommu_support_in_cmdline(cmdline): Line 261: return 'yes' better return plane booleans Line 262: else: Line 263: return 'no' Line 264: Line 265: -- To view, visit http://gerrit.ovirt.org/30471 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I789f93679740e87b2f5a88351261bc58852990d4 Gerrit-PatchSet: 5 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: [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
