From nobody Wed Dec 29 20:41:25 2021 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 0EC621924947; Wed, 29 Dec 2021 20:41:26 +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 4JPNbn4nP2z582H; Wed, 29 Dec 2021 20:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 6F00D38A9; Wed, 29 Dec 2021 20:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BTKfPsY099548; Wed, 29 Dec 2021 20:41:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BTKfPD5099547; Wed, 29 Dec 2021 20:41:25 GMT (envelope-from git) Date: Wed, 29 Dec 2021 20:41:25 GMT Message-Id: <202112292041.1BTKfPD5099547@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 19a172158cc1 - main - vfs_mountroot: Wait for GEOM idle post root holds 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19a172158cc12b3bdd848fead732f2151c36e526 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640810485; 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=H39wTxYFWxT1jKv24DN0XfJSm3F4v4/Ex7W39quL3qA=; b=EFB+m2G3Aeje13ssfeyqUKQdAT2YXiV+0u7dn7a6Ba2R/SJYCRvps+tZaGJKJXnHn4lDKS +LC5/n8qzzQPfvIwGXBEaOK+WAtBD92zow9veVB3YgadA+FeW+R0YFLUNySqsv4VNjlHPE th6p92JElY50bBeJ/JbhlWkvJc7khJIxMzzaqPNmt9tRwO9qOlWrBddamtKkd8+Fmsd1VT 5CqfkyIAfqMlrqRP6C3sRHdiWAmJsQfSiq7MPg4IMG0+Gt7LeAyzi/Kk/9m2723UGxxQK5 jh7kooTADZPMiHwHQHGJNd/luBHrKzq6wEyZRqJUBDJsV7ue2HBWIGvXJG/DZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640810485; a=rsa-sha256; cv=none; b=UWUGSd9cBu93rST9oyu1+65XM5WGaX+NySe/ROrp91yr5etKG454nG/zLhGzTV2mR2S8j4 NJ2ECYOz46GvfAFNhbrzTBrZ2+WvwiLcBDqB/EZ0b/E8dsHPoo45C/n3jDckBXq003+A84 4Witm9ExwksyT7+NWmDMB4lfLXLmMJKp7GTDXH7K7tkMfVg5Z0esjIWJuLtY4/4Y06GRhe oF1CoNLP2eThykNz8qiz5IX1eAWUyAXbe2RQrpbrDwlxp37pCDmBB7esXXe5mIKGFe3v4i TvvRtVm4Zw1/Hf5rFLB5FLG+uvr2mAgZXbLT7MbKzehAXIa4eoo3HNxOx3XtcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=19a172158cc12b3bdd848fead732f2151c36e526 commit 19a172158cc12b3bdd848fead732f2151c36e526 Author: Colin Percival AuthorDate: 2021-12-20 17:51:34 +0000 Commit: Colin Percival CommitDate: 2021-12-29 20:41:08 +0000 vfs_mountroot: Wait for GEOM idle post root holds In the case of a root hold related to the initialization of a disk device, a flurry of GEOM tasting is likely to take place as soon as the device is initialized and the root hold is released. If we don't wait for GEOM idle it's easy for vfs_mountroot to "win" the race and proceed before the root filesystem GEOM is ready. Reviewed by: imp Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D33592 --- sys/kern/vfs_mountroot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c index bb431c38a6f6..6257f9592d86 100644 --- a/sys/kern/vfs_mountroot.c +++ b/sys/kern/vfs_mountroot.c @@ -1005,6 +1005,7 @@ vfs_mountroot_wait(void) hz); TSUNWAIT("root mount"); } + g_waitidle(); TSEXIT(); }