From owner-dev-commits-src-all@freebsd.org Mon Mar 22 22:51:56 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 509825BD41A; Mon, 22 Mar 2021 22:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F48rX0SNYz4rtT; Mon, 22 Mar 2021 22:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0005515FD9; Mon, 22 Mar 2021 22:51:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12MMpt3G071531; Mon, 22 Mar 2021 22:51:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12MMptBX071530; Mon, 22 Mar 2021 22:51:55 GMT (envelope-from git) Date: Mon, 22 Mar 2021 22:51:55 GMT Message-Id: <202103222251.12MMptBX071530@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 6a1dbc8ba956 - stable/13 - iscsi: Mark iSCSI CAM sims as non-pollable. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6a1dbc8ba95653c358afb23126a95d4aec51f48b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2021 22:51:56 -0000 The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6a1dbc8ba95653c358afb23126a95d4aec51f48b commit 6a1dbc8ba95653c358afb23126a95d4aec51f48b Author: John Baldwin AuthorDate: 2021-02-11 21:51:20 +0000 Commit: John Baldwin CommitDate: 2021-03-22 20:37:46 +0000 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. Sponsored by: Chelsio (cherry picked from commit 47769bc5573fc5d2263f9e20cb06f6c12d0a82e7) --- sys/dev/iscsi/iscsi.c | 10 +--------- 1 file changed, 1 insertion(+), 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) { @@ -2462,13 +2461,6 @@ iscsi_action(struct cam_sim *sim, union ccb *ccb) xpt_done(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) {