From nobody Thu Oct 03 15:07:25 2024 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 4XKFQk26Dhz5YQys; Thu, 03 Oct 2024 15:07: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XKFQk1DWkz4f0S; Thu, 3 Oct 2024 15:07:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727968046; 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=6VBPrZSyCIKoDvfO8rhPX6tLoHihoprHYWjqbpwLnBo=; b=qWGY3Z0pInOKzpEqgxEWcICZ9Ddz5YgC5OOfBayeX0ajpFxPvvxfvK6RGw/bo0kt3BgAz/ sWlGyyWg71ZsVc82qJD8pDysFRKaUB4ko/E4a8Flu2tK90fiGowTG6DVm6y254IMEBV0Zl NDVX+5YW0zU3VAywSqtmkvQqqOFGawvfTHoHMVYxGvXP2vlxqZYShlrEKQVcYzkuCKFsKu Sn9hJ5d5IcaoBcf18T2iHw0J/cx3uH6l+c9ubwiCkF/tqt0vYEEE/qezjdZ6YI7VdLe9fJ f7okmG1ka7mHsLmoxilwiBBubPZXmoqC/CJaWsbRfdfAJfj9CIm4OKte13BW3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727968046; 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=6VBPrZSyCIKoDvfO8rhPX6tLoHihoprHYWjqbpwLnBo=; b=ZPDg0A5pJgZ4BCITLid3iDWKheZxufpUC3hLUcahvbHGWNfIyVF7RGjKmonGEr3GBUuUdd +r3gmNwxnzCoT4+h29XanzQAWmEaTzvmK/4p6HYi3XeAPj4mHt5MuFKSP8VSc8rYy3Lhit il6E2ezcEr8TTtytQFRXRKcjL+6a0s4RRwjfzyiUSO+EZ3FYhyoWH32TZnbyRA02kjomVK Y2FKg8Imx5x1sqpB5usrUQFXiNiFo4+mxrMW5/ApipPJZvK6EqGllFq7qC6DEtrYOk0/aq 8I4SWCctrM383viiAKUnhnREOVSXnWVquIrZQVRQUNA0LSowm+JqBXkWeL8TvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727968046; a=rsa-sha256; cv=none; b=mJTxOoteMg6y0VapywDU0+f1sdGGkGAdVC0sjm8KstJ8396w/SaTO0M2KTIrbxxfYBlzZt dTZJ/AM1nmDzbdol1hwCsg+mYIAZlEgUe7VihYOzSUQUlk0rVvuwbtaQ+sMYI//FOKNXoL AwlxKWiXlFtVl3Vm/XJzAtBYipB5CBSfvdpMS4zhwGvEXwqYRFXMFhnVr/mcXEGJZ3ZgLs JuLr7SLfZBBf/iVzpri8RaMWStULRDf4cDa1s/JsL28tkBkAXtam/1iMJ4Ge/kfD+6xfZp XzS5OnaWjdzBOciJWXhtXZnIl1r35xOtYLEJjev43I80UMOoGeCd8T5ExuGD7A== 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 4XKFQk0GD2zw3y; Thu, 3 Oct 2024 15:07:26 +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 493F7PdZ018714; Thu, 3 Oct 2024 15:07:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 493F7Pac018711; Thu, 3 Oct 2024 15:07:25 GMT (envelope-from git) Date: Thu, 3 Oct 2024 15:07:25 GMT Message-Id: <202410031507.493F7Pac018711@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 5b21d4ad060a - main - Ensure that soft updates are not enabled by default when using mdmfs(8) 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: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b21d4ad060acb06c72e0458daebec9bcbf0cefd Auto-Submitted: auto-generated The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=5b21d4ad060acb06c72e0458daebec9bcbf0cefd commit 5b21d4ad060acb06c72e0458daebec9bcbf0cefd Author: Kirk McKusick AuthorDate: 2024-10-03 15:05:42 +0000 Commit: Kirk McKusick CommitDate: 2024-10-03 15:06:28 +0000 Ensure that soft updates are not enabled by default when using mdmfs(8) When soft updates began being enabled by default that change carried over to mdmfs(8) which does not want or need them. This fix ensures that they are only enabled in mdmfs(8) when requested with the -U flag. Reported by: Ivan Rozhuk Tested by: Ivan Rozhuk PR: 279308 MFC after: 1 week --- include/paths.h | 3 +++ sbin/mdmfs/mdmfs.c | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/paths.h b/include/paths.h index 86900664230b..f8861ea4e5a8 100644 --- a/include/paths.h +++ b/include/paths.h @@ -89,6 +89,7 @@ #define _PATH_SENDMAIL "/usr/sbin/sendmail" #define _PATH_SHELLS "/etc/shells" #define _PATH_TTY "/dev/tty" +#define _PATH_TUNEFS "/sbin/tunefs" #define _PATH_UNIX "don't use _PATH_UNIX" #define _PATH_UFSSUSPEND "/dev/ufssuspend" #define _PATH_VI "/usr/bin/vi" @@ -138,6 +139,8 @@ __END_DECLS #define _PATH_REBOOT "/rescue/reboot" #undef _PATH_RM #define _PATH_RM "/rescue/rm" +#undef _PATH_TUNEFS +#define _PATH_TUNEFS "/rescue/tunefs" #undef _PATH_VI #define _PATH_VI "/rescue/vi" #undef _PATH_WALL diff --git a/sbin/mdmfs/mdmfs.c b/sbin/mdmfs/mdmfs.c index 93fa9e8ff0c0..69149b3fb465 100644 --- a/sbin/mdmfs/mdmfs.c +++ b/sbin/mdmfs/mdmfs.c @@ -104,7 +104,7 @@ main(int argc, char **argv) bool detach, softdep, autounit, newfs; const char *mtpoint, *size_arg, *skel, *unitstr; char *p; - int ch, idx; + int ch, idx, rv; void *set; unsigned long ul; @@ -357,6 +357,13 @@ main(int argc, char **argv) do_mdconfig_attach(mdconfig_arg, mdtype); if (newfs) do_newfs(newfs_arg); + if (!softdep) { + rv = run(NULL, "%s %s /dev/%s%d", _PATH_TUNEFS, + "-n disable", mdname, unit); + if (rv) + errx(1, "tunefs exited %s %d", run_exitstr(rv), + run_exitnumber(rv)); + } do_mount_md(mount_arg, mtpoint); }