iscsi: update the spdk_iscsi_poll_group_poll handling
Change-Id: I9e385e2821592efb0bf7369ebd5a997c9113b5a7 Signed-off-by: GangCao <gang.cao@intel.com> Reviewed-on: https://review.gerrithub.io/404081 Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
0d7d3a05c3
commit
7954a8dc2a
@ -36,6 +36,7 @@
|
||||
#include "spdk/env.h"
|
||||
#include "spdk/string.h"
|
||||
#include "spdk/sock.h"
|
||||
#include "spdk/likely.h"
|
||||
|
||||
#include "iscsi/iscsi.h"
|
||||
#include "iscsi/init_grp.h"
|
||||
@ -865,11 +866,13 @@ spdk_iscsi_poll_group_poll(void *ctx)
|
||||
struct spdk_iscsi_conn *conn, *tmp;
|
||||
int rc;
|
||||
|
||||
if (!STAILQ_EMPTY(&group->connections)) {
|
||||
rc = spdk_sock_group_poll(group->sock_group);
|
||||
if (rc < 0) {
|
||||
SPDK_ERRLOG("Failed to poll sock_group=%p\n", group->sock_group);
|
||||
}
|
||||
if (spdk_unlikely(STAILQ_EMPTY(&group->connections))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
rc = spdk_sock_group_poll(group->sock_group);
|
||||
if (rc < 0) {
|
||||
SPDK_ERRLOG("Failed to poll sock_group=%p\n", group->sock_group);
|
||||
}
|
||||
|
||||
STAILQ_FOREACH_SAFE(conn, &group->connections, link, tmp) {
|
||||
|
Loading…
Reference in New Issue
Block a user