From nobody Fri Dec 08 22:03:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sn4rr2CMdz53Tlr; Fri, 8 Dec 2023 22:03:08 +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 4Sn4rr1mtnz4SxM; Fri, 8 Dec 2023 22:03:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702072988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vJ32kNf/NgEqj/RyabKcbcKtBFXRsJg9xt7HsnzGwk4=; b=gUOneUMKnfqFVgPMYSpCArQ9tw43VtNt7QKbFDRS5SZxlxRyU4hCBfkrBGTggzaTBiR6cJ sOu7neDP+rXyns6QcDqz+iSXiqjYbxGVJvUOYpBhKbohwdmxGHmlXTceFwkC/WQkgcMf13 /dFVY+G0FGWRzZT/w9o8LTI+xhWFmuhJAxTCcLVx7K3eqdRlz7f8wT58JkhRjsEJOfsgGm u/QwUsdaZEnGBhE0/2kPEq4x4tq5T7zVsD+swoz2vNwsvhmcfLcOfjwwNhjoyKf811lfT+ YnyXpONfNXOn+P3czjIhAkFLFf/Y46MSCFDvY4WfrhOjOL0IwYvWo8F2RCGF/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702072988; a=rsa-sha256; cv=none; b=DCcCDHwIrIWRBp3m95QojmF8k8kPYBZjo6/r/x4HS9FkqFyzsJtz6plIMLmK9xpdBectaB JP4sc40M/MKqRxyt9iCs3wxCdAo+gDoRGdpP8TbFosGke//i1I8KeuQVWyRUAMJ8Lh+tWW Ac7pPLSjD+1BRK/K9qngoZOn5kTVY6ko91/oZoKrM35e+bmmK/WdUUVh5kYYHNcWLckh/c TArNXbCwMn5osOCbrTPRXk2sQ578wJFWQzQQICMe919MGSWwc7PkMxw7luqt5wg40pQjWP PA1oe8PtJ4efl+JuoP2HtMn3ZNnC9CHGyCbap4i3B3ySP91QaQVoVo3UdmnQhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702072988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vJ32kNf/NgEqj/RyabKcbcKtBFXRsJg9xt7HsnzGwk4=; b=XWL8924Em8vXKBwCXcM2YpXJHEjOJkjBE3TOm3gD7/G7I8NBI5DI53Jh5Ir05Q4j7Jgqna cRbvERQCuwKzWoWo3tL16n+baPBuzIGyb04fEH/d0UXFUT+uJ8MW8at4RHdi2McNsQnQq8 wEdNkZHZZtj3MezPdUowesYNnsIQOdD2p+SEgQM0lcSh69rOwe10j25wAdaME/eRbybyOi Rww2Uni9ap6uvG7LghBeJfVPb+OpLVfiAsMwkvwcTeJdYpb6HF6TI3OXJSGOY7VIkRu8oi OZu5KUQm5ZP8KE9CPtzWyXT8oZ2toaFdUiZzD8a+Ah1CCqr+BsImId5SxuV+CQ== 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 4Sn4rr0kH4zdXD; Fri, 8 Dec 2023 22:03:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3B8M38R9020974; Fri, 8 Dec 2023 22:03:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3B8M38lR020971; Fri, 8 Dec 2023 22:03:08 GMT (envelope-from git) Date: Fri, 8 Dec 2023 22:03:08 GMT Message-Id: <202312082203.3B8M38lR020971@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: a8ba64ca91d4 - stable/14 - iscsi: adjust shutdown_pre_sync handler List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a8ba64ca91d479346c9a7f99ef3eeceb1976ac13 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a8ba64ca91d479346c9a7f99ef3eeceb1976ac13 commit a8ba64ca91d479346c9a7f99ef3eeceb1976ac13 Author: Mitchell Horne AuthorDate: 2023-11-23 15:26:12 +0000 Commit: Mitchell Horne CommitDate: 2023-12-08 22:02:44 +0000 iscsi: adjust shutdown_pre_sync handler Don't attempt to service reconnections if RB_NOSYNC is set. More crucially, don't do it if the scheduler is stopped, as the maintenance thread will never run again. Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42342 (cherry picked from commit 2ce1c45b3411410a5d0a4d08198a3b0010d493b7) --- sys/dev/iscsi/iscsi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c index 311b339caf7a..38973898a9d1 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -2680,11 +2681,12 @@ iscsi_terminate_sessions(struct iscsi_softc *sc) } static void -iscsi_shutdown_pre(struct iscsi_softc *sc) +iscsi_shutdown_pre(struct iscsi_softc *sc, int howto) { struct iscsi_session *is; - if (!fail_on_shutdown) + if (!fail_on_shutdown || (howto & RB_NOSYNC) != 0 || + SCHEDULER_STOPPED()) return; /*