[PATCH 2/3] iscsid logging blank messages at level EMERG

2018-06-13 Thread Chris Leech
reset head on wrap when buffer empty Reported-By: David Jeffery --- usr/log.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr/log.c b/usr/log.c index 26c61d847793..b730642779bf 100644 --- a/usr/log.c +++ b/usr/log.c @@ -189,6 +189,9 @@ int log_enqueue (int prio, const char * fmt, va_l

[PATCH 1/3] vlan setting sync across ipv4/ipv6 for be2iscsi

2018-06-13 Thread Chris Leech
be2iscsi exports two ifaces per host port for ipv4 and ipv6 network configurations. But, they need to have the same link level configuration including vlan settings. If vlan setting are modified in only one iface record, then whichever record is applied last (filesystem dependant I think) will take

[PATCH 0/3] various fixes

2018-06-13 Thread Chris Leech
A few things, some of which I thought I'd already sent/merged upstream. Chris Leech (3): vlan setting sync across ipv4/ipv6 for be2iscsi iscsid logging blank messages at level EMERG iscsistart: prevent unix socket cross-talk usr/iscsiadm.c | 132 ++

[PATCH 3/3] iscsistart: prevent unix socket cross-talk

2018-06-13 Thread Chris Leech
iscsistart forks two processes and acts as both iscsiadm and iscsid, sending commands to itself over a unix socket. If multiple iscsistart processes are running, or iscsistart and iscsid are both running, the front-end portions can end up communicating to the wrong back-end. Adjust the unix socke

[PATCH 1/4] libopeniscsiusr: fixes err on prefix_len

2018-06-13 Thread Chris Leech
The iface.prefix_len field might be present in existing records created with older versions of the Open-iSCSI tools. Need to not start throwing errors after an update. --- libopeniscsiusr/idbm.c| 2 ++ libopeniscsiusr/idbm_fields.h | 1 + libopeniscsiusr/iface.h | 6 +- 3 files

[PATCH 3/4] libopeniscsiusr: clear errno before calling strtoll

2018-06-13 Thread Chris Leech
errno must be set to 0 before calling strtoll or error checking will have false positives --- libopeniscsiusr/sysfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libopeniscsiusr/sysfs.c b/libopeniscsiusr/sysfs.c index 6f295b702821..d312d4e299d0 100644 --- a/libopeniscsiusr/sysfs.c +++ b/li

[PATCH 4/4] libopeniscsiusr: setup ipv6 records based on iface name

2018-06-13 Thread Chris Leech
The is_ipv6 flag (runtime iface rec representation only, not on disk) was being set when creating ifaces from sysfs, but not when reading them in from an iface record file. This caused ipv6 iface records to be reported as malformed and ignored. Fix that with a name check for an "ipv6" substring. O

[PATCH 0/4] libopeniscsiusr iface record fixes

2018-06-13 Thread Chris Leech
In testing the latest code against a variety of iSCSI HBAs, I found some regressions in the iface handling after merging the libopeniscsiusr code. Chris Leech (4): libopeniscsiusr: fixes err on prefix_len libopeniscsiusr: hosts can have multiple ifaces libopeniscsiusr: clear errno before cal

[PATCH 2/4] libopeniscsiusr: hosts can have multiple ifaces

2018-06-13 Thread Chris Leech
Both be2iscsi and qla4xxx export multiple iface ojbects in sysfs per host to represent the number of network configurations (ipv4/ipv6) that can be supported. Fix the libopeniscsiusr code to create and manage multiple offload iface records per host, as the old code did. --- libopeniscsiusr/iface.c