From nobody Sun May 3 15:45:38 2026 X-Original-To: dev-commits-src-branches@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 4g7pyV3m7Lz6W2yV for ; Sun, 03 May 2026 15:45:38 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g7pyV31qHz3JMD for ; Sun, 03 May 2026 15:45:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777823138; 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=pu+pVcL4d0PCZ8VR8Y5l/GP9AOlWmtY1lyvElV69RcM=; b=ePsxVmWFYYheeYJEmnBnCjMzJJRhbPHb4FIYILPxt33uoRgap689zDz5HVGj1kpzyZGhyJ mw1JF/Tpgj1jTXT0ExrWzCnBmUrlDYyxRHvk+waAzL/Rsmlb0iJKBezj6HsiLbR+/6jjaL Y2mj0O3cNw1OgkKaHrTcTWlGa5b2EuWce8v1VsnjrsX1GAm65IhK+j58nNm2/GstX6tsSy BUpY7/iiElwpg+SPQVBaTJ2Oqxn1uT+AY/g2l8vqETjYIhMlHw5xnqmcuAyvcfygzlsvcB 0IXqxLbxfg8M6BxmDn2U/x7Ywp0x3R1uzqLmvH14ZVrNGH0Ill1UZroj9wT+yg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777823138; a=rsa-sha256; cv=none; b=ju8IDO41CYX+COwiwpyP3q4NPjzStxG1jHguxGH9AUXraBMugXYSdw+P02m06jiAAN7mCD ivyoEz4viTDRMKOn6CYuuHKPxi4FLaAbUpl1t1S2Sl4KGYkqaWgu0X/ZdokHY1pWMxvBed uGb2PckfAOT80RzwMwRffoeCvCe3T2OH+czvtG3Cl6fu+8YMAK+lzBtXDb1pQxrnKd5e3N kZGqapWxpS0C9Sb7NNQmk4WKScURK7owfwSsESd+BSZqQO5Xu6/wckc8X6C4zSNct1eMr0 FGcNLYhKFh9xokVX2u4sBaPeEeK0wZrrpF9/XSUG8PLCBcxFVO8fBBuyceArOQ== 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=1777823138; 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=pu+pVcL4d0PCZ8VR8Y5l/GP9AOlWmtY1lyvElV69RcM=; b=VMmI7xGIQ9mfyo5Tfkt9t3/e3Sj3kUK0zeQPdbcT+MpEr5gdDMEyg+OGoe7rw/tdFO0ogt RhUDiCrgLnVHP39scifprGo1iKklatOEwTNz8OPEC0BbIrYbi9dXIb5iHi359gJYBNEYtm 5+KEDVRRdWDS2JgKQk02SEzJ/Um+B6R0rjR9TQm+RGsaMtSNBvJch3QRuV6PfX6zrH0xTQ iBHGn+kHoTQe3PbQiTVI5LqUV+bhQ1jNvm7kTnl0lC+47AKIM7I0UiEK7FirUrMISBnsSs 5L9wbI9N7Ji7fSSdEACoDi0HIRYiKm4TimeeBxlDD1G5QZfxvmAtnoV+c9wrbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g7pyV27jBzfhK for ; Sun, 03 May 2026 15:45:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d841 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 03 May 2026 15:45:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 793be115a029 - stable/15 - geom: Make g_waitidle() wait for orphaned providers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 793be115a0292878c866752e197afe571e52db8f Auto-Submitted: auto-generated Date: Sun, 03 May 2026 15:45:38 +0000 Message-Id: <69f76da2.1d841.4af00322@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=793be115a0292878c866752e197afe571e52db8f commit 793be115a0292878c866752e197afe571e52db8f Author: Mark Johnston AuthorDate: 2026-04-09 01:08:45 +0000 Commit: Mark Johnston CommitDate: 2026-05-03 14:40:10 +0000 geom: Make g_waitidle() wait for orphaned providers This is motivated by the following race in the ZFS zvol code. When a zvol is created, we create a GEOM-backed zvol, which results in a /dev/zvol/ device file, created by GEOM::dev. If volmode=dev is specified, zvol_set_volmode_impl() will wither the GEOM, then create a device file with the same name. This sometimes fails because g_wither_geom() is asynchronous, so we end up trying to create a device file while the old one still exists. I want to fix this by adding a g_waitidle() call to zvol_os_remove_minor(). g_waitidle() is not sufficient: GEOM::dev does not destroy the device until g_dev_orphan() is called. (In fact the device destruction is asynchronous too, but the delist_dev() call is sufficient to address this race.) So, I propose modifying g_waitidle() to block until orphaned providers are processed. PR: 258766 Reviewed by: mav, imp, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D55049 (cherry picked from commit 36d971464ac21f6531cb9eaa377f4e1dd915a2ad) --- sys/geom/geom_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c index ffd46db55416..34649cea5a71 100644 --- a/sys/geom/geom_event.c +++ b/sys/geom/geom_event.c @@ -84,7 +84,7 @@ g_waitidle(struct thread *td) mtx_lock(&g_eventlock); TSWAIT("GEOM events"); - while (!TAILQ_EMPTY(&g_events)) + while (!TAILQ_EMPTY(&g_events) || !TAILQ_EMPTY(&g_doorstep)) msleep(&g_pending_events, &g_eventlock, PPAUSE, "g_waitidle", 0); TSUNWAIT("GEOM events");