Hi Eddie,
you beat me to it ...
On 07/26/2011 02:28 AM, Eddie Wai wrote:
Hello Mike,
The following snippet from the 39d4ceb04f051c208ae7509d268a3871ffa194c5
commit is preventing bnx2i from being able to offload when connecting
through the iscsi_sysfs_get_hostinfo_by_host_no code path where the
session argument == NULL. The initiatorname sysfs inquiry failed but
this is expected since it does not exist in the iscsi_host for bnx2i.
Perhaps the error return code should only be propagated upward when
session != NULL specifically for hbas like qla4xxx?
Thanks,
Eddie
----- 8< ----- 8< -----
@@ -527,7 +528,10 @@ static int iscsi_sysfs_read_iface(struct iface_rec
*iface, int host_no,
iface_str(iface));
}
}
- return ret;
+ if (ret)
+ return ISCSI_ERR_SYSFS_LOOKUP;
+ else
+ return 0;
}
----- 8< ----- 8< -----
Actually, this is the patch I have:
diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c
index e82fe80..145816d 100644
--- a/usr/iscsi_sysfs.c
+++ b/usr/iscsi_sysfs.c
@@ -489,7 +489,7 @@ static int iscsi_sysfs_read_iface(struct
iface_rec *iface, int host_no,
if (ret) {
ret = sysfs_get_str(id, ISCSI_HOST_SUBSYS,
"initiatorname",
iface->iname,
sizeof(iface->iname));
- if (ret)
+ if (ret) {
/*
* default iname is picked up later from
* initiatorname.iscsi if
software/partial-offload.
@@ -499,6 +499,8 @@ static int iscsi_sysfs_read_iface(struct
iface_rec *iface, int host_no,
*/
log_debug(7, "Could not read initiatorname
for "
"host%d\n", host_no);
+ ret = 0;
+ }
}
/*
(Well, of course it got line-wrapped, but should get you the idea).
I'll be sending the proper patch to the mailing-list shortly.
But yes, that is a real issue.
Independent on any bnx2i; any offloading engine _not_ listing the
initiatorname as a host attribute will fail.
Not nice.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
[email protected] +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
You received this message because you are subscribed to the Google Groups
"open-iscsi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/open-iscsi?hl=en.