From nobody Tue Mar 3 18:01:17 2026 X-Original-To: dev-commits-src-main@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 4fQNsB310Bz6TQrP for ; Tue, 03 Mar 2026 18:01:18 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fQNs95PCyz3Jb6 for ; Tue, 03 Mar 2026 18:01:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772560877; 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=FtSV6JgRoJaNRyAKhil+AnDFoVOfj/uEj4zNKWRcLr8=; b=pnC1cZ2cwm/XiBxsxBBYkWejZOXq8jzVUrsFRCUp6Y+dUI1NhyM7Nh4KHoZJ1R4lyAVPqu ++KaZWEEYsoNM3EWLvy2b5QXqv8Ne4JAW+Cdd5EpRkFz2zDqQfFPqWaD0gPBjwsGsPV7Kz sCL7ckvQzNaC0MY/r1ACso1eEGNXHFBuUYwOf9uemnSd9/mHPs+PVMwEoW4DL/oQuomSAH +6nSgvHT2oV9RXxShsOIR8JWhLeP88J/IJhu4UqWS/C1r3sVGzs2Kc+T6K91mDI4jlWpQ0 TDsbbBZzmtiFdydgk62bhwOUGZDKhEwMFnEavBFusr2k9EpL0oVS1imlg0Dy0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772560877; a=rsa-sha256; cv=none; b=UAiyh6NrY179z4H0epeFdsquGxOcKHKjqUzFjgZskrvFkGr2AoZ6BoYZK3pds3fVWdDyYe ijapiAwkD12HMLV9xXn1N7+A/PqnSyjHNhrPV/ZEGj8BL+7J0B0KpkErDggLTdgD/hen77 A++5ODwpzXDs7yzctuGmPvHcaZotFHgY94VFHYelzuME/JkRLes8Fl3uLFkBZe08lmuK1t vBUlRdfOAWKghI48gPVRw8tFQI+cXCnVKq1jkuE/Z4rKQ+HHtzL4gXKUGGMAwA+2y1jYT+ xADDFBD6GXqQRdKDm1A5udhjuk9jbVR3T82ADPjDHeTrVZZJnFzLrwwmZ6bLDA== 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=1772560877; 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=FtSV6JgRoJaNRyAKhil+AnDFoVOfj/uEj4zNKWRcLr8=; b=Sirx2eAfuKI0+OqCzWX4ZOvAkaYRh2USL9rSFk82NKNFKHM8nzfKy7heAZ3t3/+XqRQDDo jnhklA2EXPIvuA0tdR9pkVenlcyACJzZrIokV9HVEBhi/htqX5u3/o8yaEkvRKuYh6jasd KpToTOnwyhc5HsMXE7vggmTn64LXUrNsXrNL4KpZMYzUvFmOUhYTBKhe7KzWheczh6RnvV WS+xHgNUEqiarjsdZEfkBlzQ2/ZOxhTXe/ACxFfhKVjRwLXEsp27bv7CKBhEn3Bpjhlx60 OKXN3HE7jmtybHKcT1aBHabOSPmRx/ri4gLL4INxko7C8HgwoV1Pc6yTp9XvRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fQNs94QX8z19S for ; Tue, 03 Mar 2026 18:01:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42fa8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 03 Mar 2026 18:01:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 824530a5c4fd - main - nda: Assume all cases in ndaasync can sleep List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 824530a5c4fd59427cda0eae0a4ac85212814958 Auto-Submitted: auto-generated Date: Tue, 03 Mar 2026 18:01:17 +0000 Message-Id: <69a721ed.42fa8.5c0394b@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=824530a5c4fd59427cda0eae0a4ac85212814958 commit 824530a5c4fd59427cda0eae0a4ac85212814958 Author: Warner Losh AuthorDate: 2026-03-03 18:00:15 +0000 Commit: Warner Losh CommitDate: 2026-03-03 18:00:15 +0000 nda: Assume all cases in ndaasync can sleep The error recovery is nicer if we can wait for the tiny memory we need to send the messages when the physpath changes. Since we've moved the async handler into a sleepable context, we can wait for the allocation to complete since async events are rare enough and it's not an indefinite wait. Also add a comment about the scope of AC_ADVINFO_CHANGED for nvme drives. We could use it for broadcasting INDENTIFY changes in nvme drives. However, the underlying mechanisms in NVMe don't really allow for that (they are more fine-grained). So for namespace changes, for example, we'll send AC_GETDEV_CHANGED instead of a AC_ADVINFO_CHANGED. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D55523 --- sys/cam/nvme/nvme_da.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index a1114ffe8a44..be578bae5da5 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -782,11 +782,19 @@ ndaasync(void *callback_arg, uint32_t code, struct cam_path *path, void *arg) { uintptr_t buftype; + /* + * Note: In theory, we could send CDAI_TYPE_NVME_* events here, + * but instead the rescan code only sends more specific + * AC_GETDEV_CHANGED. There's no way to generically get + * notifications of changes to these structures from the drive + * (though we could notice with memcmp). The automation in NVME + * is at a much more granular level, so we leverage that. + */ softc = periph->softc; buftype = (uintptr_t)arg; if (buftype == CDAI_TYPE_PHYS_PATH) { disk_attr_changed(softc->disk, "GEOM::physpath", - M_NOWAIT); + M_WAITOK); } break; }