diff options
authorJohn Baldwin <jhb@FreeBSD.org>2021-02-11 21:51:20 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2021-02-11 21:52:18 +0000
commit47769bc5573fc5d2263f9e20cb06f6c12d0a82e7 (patch)
parente07ac3f2fd7336e04178d116033989a6c099fec4 (diff)
iscsi: Mark iSCSI CAM sims as non-pollable.
Previously, iscsi_poll() just panicked. This meant if you got a panic on a box when using the iSCSI initiator, the attempt to shutdown would trigger a nested panic and never write out a core. Now, CCB's sent to iSCSI devices (such as the sychronize-cache request in dashutdown()) just fail with a timeout during a panic shutdown. Reviewed by: scottl, mav MFC after: 2 weeks Sponsored by: Chelsio Differential Revision: https://reviews.freebsd.org/D28455
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c
index c4123d9f4aa7..4367f780d84b 100644
--- a/sys/dev/iscsi/iscsi.c
+++ b/sys/dev/iscsi/iscsi.c
@@ -171,7 +171,6 @@ static void iscsi_pdu_handle_reject(struct icl_pdu *response);
static void iscsi_session_reconnect(struct iscsi_session *is);
static void iscsi_session_terminate(struct iscsi_session *is);
static void iscsi_action(struct cam_sim *sim, union ccb *ccb);
-static void iscsi_poll(struct cam_sim *sim);
static struct iscsi_outstanding *iscsi_outstanding_find(struct iscsi_session *is,
uint32_t initiator_task_tag);
static struct iscsi_outstanding *iscsi_outstanding_add(struct iscsi_session *is,
@@ -1491,7 +1490,7 @@ iscsi_ioctl_daemon_handoff(struct iscsi_softc *sc,
return (ENOMEM);
- is->is_sim = cam_sim_alloc(iscsi_action, iscsi_poll, "iscsi",
+ is->is_sim = cam_sim_alloc(iscsi_action, NULL, "iscsi",
is, is->is_id /* unit */, &is->is_lock,
1, ic->ic_maxtags, is->is_devq);
if (is->is_sim == NULL) {
@@ -2463,13 +2462,6 @@ iscsi_action(struct cam_sim *sim, union ccb *ccb)
static void
-iscsi_poll(struct cam_sim *sim)
- KASSERT(0, ("%s: you're not supposed to be here", __func__));
-static void
iscsi_terminate_sessions(struct iscsi_softc *sc)
struct iscsi_session *is;