94ae7e973d
- fcoemon cannot start FIP responder (bsc#988887) * 0010-fcoemon-fixup-log_nlmsg_error.patch * 0011-fcoemon-Add-debugging-message-for-recv.patch * 0012-fcoemon-Retry-fcm_link_getlink-on-EBUSY.patch * 0013-Fallback-to-default-MAC-address-for-FIP.patch - Rediff patch * 0006-fipvlan-fixup-return-value-on-error.patch - Rename patch * old: 0009-fcoemon-c-add-a-check-to-verify-if-dcbd-is-to-be-initialized-else-do-not-try-to-connect-to-dcbd-lldpad.patch * new: 0009-fcoemon.c-Add-a-check-to-verify-if-dcbd-is-to-be-ini.patch - Fixup spec file to correctly refer to service_del_postun - Don't activate DCB on adapters which do DCB in Hardware (bsc#985816) + 0009-fcoemon-c-add-a-check-to-verify-if-dcbd-is-to-be-initialized-else-do-not-try-to-connect-to-dcbd-lldpad.patch - Update to version 1.0.31 (FATE#320515) + 0009-fcoe-utils-Add-sysfs_hba-to-to-fcoemon_utils.patch + 0010-fcoeadm-Use-internal-sysfs-based-hba-lib-for-informa.patch + 0011-fcoeadm-Use-internal-sysfs-lib-to-display-target-and.patch + 0012-fcoeadm-Use-internal-sysfs-lib-to-display-port-stati.patch + 0013-fcoeadm-Get-rid-of-some-includes.patch + 0014-fcoemon-Use-internal-sysfs_hba-library.patch + 0015-libutil-remove-definition-of-sa_hex_format.patch + 0016-fcping-Convert-fcping-to-internal-sysfs-based-implem.patch + 0017-configure.ac-Remove-libHBAAPIv2-and-libhbalinux2.patch + 0018-support-multiple-connections.patch + 0019-fcoeadm_display-Fix-display-of-NPIV-ports.patch - Fix display of NPIV ports (bsc#951859) + 0019-fcoeadm_display-Fix-display-of-NPIV-ports.patch OBS-URL: https://build.opensuse.org/request/show/408431 OBS-URL: https://build.opensuse.org/package/show/network:fcoe/fcoe-utils?expand=0&rev=27
62 lines
1.6 KiB
Diff
62 lines
1.6 KiB
Diff
From e21f1ac46b9672824e00ad907ee0443af2dbad66 Mon Sep 17 00:00:00 2001
|
|
From: Hannes Reinecke <hare@suse.de>
|
|
Date: Tue, 28 Jun 2016 14:10:38 +0200
|
|
Subject: fcoemon: Retry fcm_link_getlink() on EBUSY
|
|
|
|
If netlink returns -EBUSY as NLMSG_ERROR code there was another
|
|
callback running on that socket. So we can simply retry here.
|
|
|
|
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
|
---
|
|
fcoemon.c | 11 +++++++++--
|
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/fcoemon.c b/fcoemon.c
|
|
index 58137df..32ba30c 100644
|
|
--- a/fcoemon.c
|
|
+++ b/fcoemon.c
|
|
@@ -750,7 +750,7 @@ static void fcm_fc_event_handler(struct fc_nl_event *fc_event)
|
|
}
|
|
}
|
|
|
|
-static void log_nlmsg_error(struct nlmsghdr *hp, size_t rlen, const char *str)
|
|
+static int log_nlmsg_error(struct nlmsghdr *hp, size_t rlen, const char *str)
|
|
{
|
|
struct nlmsgerr *ep;
|
|
|
|
@@ -758,8 +758,10 @@ static void log_nlmsg_error(struct nlmsghdr *hp, size_t rlen, const char *str)
|
|
ep = (struct nlmsgerr *)NLMSG_DATA(hp);
|
|
FCM_LOG_DBG("%s, err=%d, type=%d\n",
|
|
str, ep->error, ep->msg.nlmsg_type);
|
|
+ return ep->error;
|
|
} else {
|
|
FCM_LOG("%s", str);
|
|
+ return 0;
|
|
}
|
|
}
|
|
|
|
@@ -1873,7 +1875,7 @@ static void fcm_link_recv(UNUSED void *arg)
|
|
break;
|
|
|
|
if (hp->nlmsg_type == NLMSG_ERROR) {
|
|
- log_nlmsg_error(hp, rlen, "nlmsg error");
|
|
+ rc = log_nlmsg_error(hp, rlen, "nlmsg error");
|
|
break;
|
|
}
|
|
|
|
@@ -1904,6 +1906,11 @@ static void fcm_link_recv(UNUSED void *arg)
|
|
break;
|
|
}
|
|
}
|
|
+ if (rc == -EBUSY) {
|
|
+ FCM_LOG_DBG("%s: netlink returned -EBUSY, retry\n",
|
|
+ __func__);
|
|
+ fcm_link_getlink();
|
|
+ }
|
|
}
|
|
|
|
/*
|
|
--
|
|
2.6.6
|
|
|