[libvirt] [PATCH] nodedev: fix vport detection for FC HBA

Use the host number as the host number when constructing the sysfs path instead of the variable we are trying to fill. https://bugzilla.redhat.com/show_bug.cgi?id=973543 --- Untested, but we do the same in virFindFCHostCapableVport in src/util/virutil.c. src/node_device/node_device_linux_sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_device/node_device_linux_sysfs.c b/src/node_device/node_device_linux_sysfs.c index cb2f86e..d68c3bd 100644 --- a/src/node_device/node_device_linux_sysfs.c +++ b/src/node_device/node_device_linux_sysfs.c @@ -80,7 +80,7 @@ detect_scsi_host_caps(union _virNodeDevCapData *d) d->scsi_host.flags |= VIR_NODE_DEV_CAP_FLAG_HBA_VPORT_OPS; if (virReadFCHost(NULL, - d->scsi_host.max_vports, + d->scsi_host.host, "max_npiv_vports", &max_vports) < 0) { VIR_ERROR(_("Failed to read max_npiv_vports for host%d"), @@ -89,7 +89,7 @@ detect_scsi_host_caps(union _virNodeDevCapData *d) } if (virReadFCHost(NULL, - d->scsi_host.max_vports, + d->scsi_host.host, "npiv_vports_inuse", &vports) < 0) { VIR_ERROR(_("Failed to read npiv_vports_inuse for host%d"), -- 1.8.1.5

On 12.06.2013 10:41, Ján Tomko wrote:
Use the host number as the host number when constructing the sysfs path instead of the variable we are trying to fill.
https://bugzilla.redhat.com/show_bug.cgi?id=973543 --- Untested, but we do the same in virFindFCHostCapableVport in src/util/virutil.c.
src/node_device/node_device_linux_sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/node_device/node_device_linux_sysfs.c b/src/node_device/node_device_linux_sysfs.c index cb2f86e..d68c3bd 100644 --- a/src/node_device/node_device_linux_sysfs.c +++ b/src/node_device/node_device_linux_sysfs.c @@ -80,7 +80,7 @@ detect_scsi_host_caps(union _virNodeDevCapData *d) d->scsi_host.flags |= VIR_NODE_DEV_CAP_FLAG_HBA_VPORT_OPS;
if (virReadFCHost(NULL, - d->scsi_host.max_vports, + d->scsi_host.host, "max_npiv_vports", &max_vports) < 0) { VIR_ERROR(_("Failed to read max_npiv_vports for host%d"), @@ -89,7 +89,7 @@ detect_scsi_host_caps(union _virNodeDevCapData *d) }
if (virReadFCHost(NULL, - d->scsi_host.max_vports, + d->scsi_host.host, "npiv_vports_inuse", &vports) < 0) { VIR_ERROR(_("Failed to read npiv_vports_inuse for host%d"),
ACK. Increasing context size would be helpful. I wouldn't have to even open the patched file :) Michal

On 06/12/2013 11:02 AM, Michal Privoznik wrote:
On 12.06.2013 10:41, Ján Tomko wrote:
Use the host number as the host number when constructing the sysfs path instead of the variable we are trying to fill.
https://bugzilla.redhat.com/show_bug.cgi?id=973543 --- Untested, but we do the same in virFindFCHostCapableVport in src/util/virutil.c.
src/node_device/node_device_linux_sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
ACK.
Increasing context size would be helpful. I wouldn't have to even open the patched file :)
Michal
Thanks, pushed now. Jan
participants (2)
-
Ján Tomko
-
Michal Privoznik