From nobody Sat Oct 12 22:33:12 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 4XQytx1f4Lz5Z54j; Sat, 12 Oct 2024 22:33:13 +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 4XQytw6sbjz4ccx; Sat, 12 Oct 2024 22:33:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728772393; 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=6ExU5N+lXbLZDhA3ihqNezTMJaofwBD/pIRe8a4RYbo=; b=PIdBLXYTFDSSlEfWDvLWAA5pXAdkQxEeCU5JgN03Ap3RuG4Q47Y+Y0fixS49qt+3/wluga LyCDRnW9sj5oTmlGM9hyyksuwXg99pTEJ79scQaxdSoGXXa1ud3tYK9f8CobDSsANgWVY6 RaYRoeVo4Jg2Oz2hDG8fPwqmKs8fc8ldylYdarIfMvZdTw9ZDvcHlsistUFFqvdDBeJ+sV NJbQ3jiQ0d7oiTUqoug8zKqARe3/GP/e73GoP5jiEyfjQH2iykO8bcXXBv1LVQFtNSBZV4 w63u5IrvFnYmLg8dAfXT+nbtiDa+u+9iaZOPqVHKd2moYhKui06r4QQ7ZGWs4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728772393; 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=6ExU5N+lXbLZDhA3ihqNezTMJaofwBD/pIRe8a4RYbo=; b=aGYTkY4p9PR3P0OY87LGg4yPQIHiduvwBsF+LF3EuEK2z50jmLf6Z/Do+idCLUskNfw8HD SuyhixZqy4Sx6Nb+WBLIdsZi8GFl2ZMt4CXCzEg7P4kCNfvfMpmJ4loK2L4c3hXKaUcgnu YVL56ZiGd8RUY4yROOLuAPbE3UjU8fCVOoQiqSnrOFpPknAIt+k7NN8Nle51NmQWWqM/3k QN/45eEbVEEjgP+a3DlhOpwy+lFgS3w6zykq1n0a0C/bYpaRJU85+XHVkjZYZV0bm+tsys EkXDrF83uXG5VDQ/neaTWJDu9KPTeLMbxFlnvk36jQo13rEKwjCd4K5waZuadA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728772393; a=rsa-sha256; cv=none; b=Fhv/IHGJXeqmhGExMmDKDSmRaBg1JYGYRwQIIKDAvJM8Qstkkleh1F5+N3hXb7pUoIrrhS EByMBUMaa+voTG2c4x/4DTRz6j9YD2yN3wg4O//DOMcsgo3Q0ZJ1GpzvbW3AzyqFnlsHGO J+cmFjblBPjno4Hw+sUZNBbRZy88JIp0QPm1yELccU+58dgPJxJ5b4NL0C+2u6ElrKFz2Y Au5FEzFpFzFAu0ZH9+5q3CCDvQfotBV2PsidhhQm1L6ExlfDNee6VKdrIx9/TGiGqqRBVG pn7hXv0BXxbJhJg8Jeku5VTfa+RJ0hNlddeiDABe5D8ZjLr4azkdHfgEFD+tog== 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 4XQytw6SjPzSlb; Sat, 12 Oct 2024 22:33:12 +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 49CMXCnY007174; Sat, 12 Oct 2024 22:33:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49CMXCKX007171; Sat, 12 Oct 2024 22:33:12 GMT (envelope-from git) Date: Sat, 12 Oct 2024 22:33:12 GMT Message-Id: <202410122233.49CMXCKX007171@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: 51b1d399b2de - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 51b1d399b2de88695030a23430fd6bd9cfb15293 Auto-Submitted: auto-generated The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=51b1d399b2de88695030a23430fd6bd9cfb15293 commit 51b1d399b2de88695030a23430fd6bd9cfb15293 Author: Kirk McKusick AuthorDate: 2024-10-03 15:05:42 +0000 Commit: Kirk McKusick CommitDate: 2024-10-12 22:33:05 +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: Michael Proto PR: 279308 (cherry picked from commit 5b21d4ad060acb06c72e0458daebec9bcbf0cefd) --- 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 e38fb733b54c..7f73eaaf0986 100644 --- a/include/paths.h +++ b/include/paths.h @@ -92,6 +92,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" @@ -141,6 +142,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 dbd206f953d2..ceb33362e627 100644 --- a/sbin/mdmfs/mdmfs.c +++ b/sbin/mdmfs/mdmfs.c @@ -105,7 +105,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; @@ -358,6 +358,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); }