From nobody Fri Jan 31 20:15:00 2025 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 4Yl6ZD3hJ2z5n0px; Fri, 31 Jan 2025 20:15:00 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yl6ZD2ss7z3QCd; Fri, 31 Jan 2025 20:15:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738354500; 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=dqypuCDYFliVb1dQA0LjZwNuHEC35G781ds7d52v1N0=; b=RwbpcfG4JLFDIPlI/Fg/DAu9XVZBrqX/J+4Hvq1NAIiojyof8AGRZR8uRuyZK+5n7X9/nK Z1rDHr7cZ9tZnyeLoVIKHUOwOSHUq61JHz1FvreQq+qAaaqjdDwr/sDSob7k6n2jrS4oJK 3OrynzufWHJRVlRa9HH6Y2UD7JajxX0n1z0KHmoanGUdECHt6m4OZcGue5zSRl5xa4bNJO 1xsK4u31meTJ+6Xp1HL8b85g9UG85bL+GmbVhYqpvapn4ME9lYURmLlxH1YnyRa5GEk2Mn bC8SiOWuVmjsxX0WlPECpN4bEQjwdMKxzKGGotrYi7s4vCcw/ssAJt23FbTKwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738354500; 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=dqypuCDYFliVb1dQA0LjZwNuHEC35G781ds7d52v1N0=; b=qBg6zVdLsYxYnBfjEEOkT6EKdE5ZJhDE+fCUkBczswJn4eeWFp4TIJU1M4xcCB2DPMTdjZ 6WS9gk4DuEbxSnNSyqRy5x2AiADwiaj5RQM0NmQw/GAkPSKDFcFULQdE8B13YKqCmP5rl+ MMJGaarJpmXqybOexB5lSMW76RRMINyAz4as8OYPBtAUEVA/uwh2+InLtHazb4YFM7T/JF YoUW/pYPwuO2gtrvqNSkhhdO6rR5YO1X1pAUT/5YgNna1y0f/mNlvSktJHWm0dh3XdRA8y ytP7aLBByIx2NVZptgUreuv79nuvFh28Zwqbsk+qYzmCZC5oNtpjf0QjbyO2iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738354500; a=rsa-sha256; cv=none; b=VT/9JLytxSchpRCHThBJUpvR9vMW3EwywlqT8fq6OgB5hv5K/oDsWQDB1ODHKZfqqSvt7k 35/nXo+Ih7h6spcvkB4wkTuSS8HUnqdfdf09ZmQ6atmZ/2C/iGMccMyQ71sl+w3rL4t/Ec IGZfus+GLHwElUrDkW6EQn5LHIJIzXboRCQqOOmttCu0F1j4TIFSP09iYjU/DViBfnYgrB 4MnUhelb0EE0aU3R8N9ORRn08IcqCvi8wPVg/M9ybokkQhntrAZyRqN75LXt0NLMPYiBXc dZcXmzGhCqtxsOdlXJKAWOzA/YrqBx+gtXrcCVn/woWgnxo96Y20UExH0ctkcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4Yl6ZD2Jt3zZ1G; Fri, 31 Jan 2025 20:15:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50VKF09u006374; Fri, 31 Jan 2025 20:15:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50VKF0T0006371; Fri, 31 Jan 2025 20:15:00 GMT (envelope-from git) Date: Fri, 31 Jan 2025 20:15:00 GMT Message-Id: <202501312015.50VKF0T0006371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 17b7a0c595a5 - main - nvmft: Don't offline a port being removed if it is already offline 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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/main X-Git-Reftype: branch X-Git-Commit: 17b7a0c595a51eaa7e83f16e99e1555bd13a445b Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=17b7a0c595a51eaa7e83f16e99e1555bd13a445b commit 17b7a0c595a51eaa7e83f16e99e1555bd13a445b Author: John Baldwin AuthorDate: 2025-01-31 20:13:52 +0000 Commit: John Baldwin CommitDate: 2025-01-31 20:13:52 +0000 nvmft: Don't offline a port being removed if it is already offline This is generally harmless but can trigger spurious warnings on the console due to duplicate attempts to disable LUNs. Sponsored by: Chelsio Communications --- sys/dev/nvmf/controller/ctl_frontend_nvmf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/dev/nvmf/controller/ctl_frontend_nvmf.c b/sys/dev/nvmf/controller/ctl_frontend_nvmf.c index 75b36b4834f5..fcfa8b90ebb7 100644 --- a/sys/dev/nvmf/controller/ctl_frontend_nvmf.c +++ b/sys/dev/nvmf/controller/ctl_frontend_nvmf.c @@ -915,7 +915,13 @@ nvmft_port_remove(struct ctl_req *req) TAILQ_REMOVE(&nvmft_ports, np, link); sx_xunlock(&nvmft_ports_lock); - ctl_port_offline(&np->port); + sx_slock(&np->lock); + if (np->online) { + sx_sunlock(&np->lock); + ctl_port_offline(&np->port); + } else + sx_sunlock(&np->lock); + nvmft_port_rele(np); req->status = CTL_LUN_OK; }