From nobody Thu Apr 09 01:10:33 2026 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 4frhgy4DmFz6Y7df for ; Thu, 09 Apr 2026 01:10: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4frhgy2lzdz3Ht8 for ; Thu, 09 Apr 2026 01:10:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775697038; 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=9ylJOsv+k8j1SdCbCOqVlWnsK0wYYXCM53TtFtEZe7s=; b=JaqHQeIsa2tAn0NVra+1WEoZY0yTpAkZif+P2aLR/EZhO3vDoAKpEmq7qp/ofrIsCI8pGd X0aPYQAfm0Kd10ypHQPRAtX7Z78R2ixkjs9TfkBcb6ZOJtcPBwlfL216fcwpMurr1GjASH /11gHowl0OERRvRXTP2uC/VUh+PGXNyHrlCH2zEJt514obaowK16DOFDHwcTfs4cOLsE+b piW1CywL4+crmsau1HkZ8f/qJJJuFC9LAKRebDCxW+wW3BUVGzcF9af8UeLPwsFRTRkH8V SvUkAMob05PmoYQYLbRdBN/70KOtBwaWqxchXTjblH3Yzud/Eb75GZ9BWZX2pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775697038; a=rsa-sha256; cv=none; b=PJJKUAqfS8xqaxuvrDmzj3kM88SMy0pB+8qDR1FIn2ZxBFcpv3PBU846cYjWUgZiSRPVQU vmin9X2T+k8nJbta5qQe04Eer5vHDM/ivawxqhgYP3Z95eOomjBz7hkCJCeWnN8G3OLt8M 02zVStGTsA57MO9rXCxS+SIBWOkb9zLdLhS9xPWG+1j59kTGfFG2KbVqSiJxVhwRlH5/sG Wg5bg7bbAm8YCBuQjZh9LZmXzXAmBpVjv/wto420roO/BL8ILq705NH9pJ6SJ0XzWJYhUb 916wGOSHQxysn531y+j+i37NP7TvP0kCtCV/FBPEM6v4GMFcyOSLFCuScqnUeQ== 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=1775697038; 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=9ylJOsv+k8j1SdCbCOqVlWnsK0wYYXCM53TtFtEZe7s=; b=mkc1NcnvzcrLt3ohbWdYUVdoF5pLJRn7CdhJg9bPcv3JJ9p43acYewnsjd+lApuB25G+Zc mbzFh51sHy/4b+BDYLkL03k0Q0FZkF6V2UHeUsAWwLoIRK9XnoG0OydwZ4U5b96jKB5DNq dG8X7/+0VXPLibBZ8YTpbx+lltImF2SU81eY0VzasoOdBiRfJyzxZJYwL9Tl7SE0zysNkv H3q6xz36lY9TjATa8nyC9S4V6DNymHRBCybq4Lq+NzcSgA2g30O3PvsxPfchqF/po8JvmB A63zzOSSrfPj9Ho/RnFHPscjgHu5HW/3DfRq40pGbKTb82fXxJHozTywndNntA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frhgy2M7rzr9K for ; Thu, 09 Apr 2026 01:10:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39bd7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Apr 2026 01:10:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 36d971464ac2 - main - geom: Make g_waitidle() wait for orphaned providers 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36d971464ac21f6531cb9eaa377f4e1dd915a2ad Auto-Submitted: auto-generated Date: Thu, 09 Apr 2026 01:10:33 +0000 Message-Id: <69d6fc89.39bd7.c1e5944@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=36d971464ac21f6531cb9eaa377f4e1dd915a2ad commit 36d971464ac21f6531cb9eaa377f4e1dd915a2ad Author: Mark Johnston AuthorDate: 2026-04-09 01:08:45 +0000 Commit: Mark Johnston CommitDate: 2026-04-09 01:10:13 +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 --- 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");