Make the wait in cfiscsi_offline() interruptible. This is the second half
of the fix/workaround for the "ctld hanging on reload" problem. PR: 220175 Reported by: Eugene M. Zheganin <emz at norma.perm.ru> Tested by: Eugene M. Zheganin <emz at norma.perm.ru> Approved by: re (kib) MFC after: 2 weeks Sponsored by: playkey.net
This commit is contained in:
parent
87acc14608
commit
d4eab13738
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338586
@ -1434,7 +1434,7 @@ cfiscsi_offline(void *arg)
|
|||||||
struct cfiscsi_softc *softc;
|
struct cfiscsi_softc *softc;
|
||||||
struct cfiscsi_target *ct;
|
struct cfiscsi_target *ct;
|
||||||
struct cfiscsi_session *cs;
|
struct cfiscsi_session *cs;
|
||||||
int online;
|
int error, online;
|
||||||
|
|
||||||
ct = (struct cfiscsi_target *)arg;
|
ct = (struct cfiscsi_target *)arg;
|
||||||
softc = ct->ct_softc;
|
softc = ct->ct_softc;
|
||||||
@ -1456,8 +1456,14 @@ cfiscsi_offline(void *arg)
|
|||||||
if (cs->cs_target == ct)
|
if (cs->cs_target == ct)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (cs != NULL)
|
if (cs != NULL) {
|
||||||
cv_wait(&softc->sessions_cv, &softc->lock);
|
error = cv_wait_sig(&softc->sessions_cv, &softc->lock);
|
||||||
|
if (error != 0) {
|
||||||
|
CFISCSI_SESSION_DEBUG(cs,
|
||||||
|
"cv_wait failed with error %d\n", error);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
} while (cs != NULL && ct->ct_online == 0);
|
} while (cs != NULL && ct->ct_online == 0);
|
||||||
mtx_unlock(&softc->lock);
|
mtx_unlock(&softc->lock);
|
||||||
if (online > 0)
|
if (online > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user