From nobody Sat Oct 12 22:30:22 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 4XQyqf4Fyhz5Z4VR; Sat, 12 Oct 2024 22:30:22 +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 4XQyqf3Ygjz4bkl; Sat, 12 Oct 2024 22:30:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728772222; 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=vIhLEHS6cZDQPoxTKE6wVwtVKsd6Kz9kRSQhZbge1dQ=; b=JePAqyYk5FC49CWHOub7UMPxwqL3JeCYh+1B43YO0DOGTD2jExTd01aQ3UTHDhfXTOhmh5 3a/LI4tlzGI2wG7Iwld63c4YHw9OnSsDzU3WWo6aqGsN/JqEc4OdHP4Hxj4fmYnmnmfZAu qhpmqv37p0H/bFLEw6hoRzEdoZWjU0h4Vn9nS+yiZLKkZixbUC88ypSHyzcEwdja/7w7Dk gdm9rPVUlVFJYO5eKSUboLJWKRSAxGmrOC6GP4NmrAYa2nm9Ze87Fdn+/22fWazHWb1/9H az3sj+kKJdHJKQFB8BbIJNxA/6ZBCAhuYbKnc9tuv4zWnDaG3Yh1UucdguC26g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728772222; 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=vIhLEHS6cZDQPoxTKE6wVwtVKsd6Kz9kRSQhZbge1dQ=; b=UqCsHrGE1qXpF78p2DsbTJqWbt3lHwztUmqs6RATq61Qq19+X1ErXzii7Xb/pmGm+Z1+mN /jmaqAyhS9BycTQ9/Jp2LDSSeHEa1KU0nRdVLSsi5E9nSDGLcqigSL/sb4FL1AJ5e8yvXe VlqL7njctNkkx1uCVtUjJ9fKLVzU5dClO62eAWN98mQcaXHeQfh3vqwTddvUx+x4SZCu1Z 4+mWPR0T79mnpDm648cVKbDdQTtKLHGPUgJx4UJEdAXgiHSwB7UtZYdZDIy2hRjINNTvnT C7plXAVi5C9V0jBCgd4HkQbwPgyg0uF6kwxc8Q6yn8OilPAwApHvn/afvP4lfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728772222; a=rsa-sha256; cv=none; b=XumKrHa1ry8+pV3xMIOv5nrsMc6yBRcBZyPN48c0NYnVT/JYDX6Gq9BhyFQGlQEYehFqMq kDzjRD3zR1oRZU8CGsyGENlgfRlhO79UC7grC0UVN6YH4xAFQ+/Ox+0qye9bEs8Ju0hPgb T4q58UrqSHdcHvNYeXttBAh0NitpCOQi0w9INuddHFF53/zudZlMB6GiDoDxHivc7rHqGK IqzF5bbrQrjazrtTu0+hZ46Rr9OYMUXeNQNmCo0Yu+WjuunGEqdr2nFKcED5m5Mf1TgVfI PhvbVHfDZdOUppgz3DH4NsNF9VgbC/Tt2UH4Qw633o2v3Tlk8JBLqEA+uPQxgQ== 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 4XQyqf32yHzSqV; Sat, 12 Oct 2024 22:30:22 +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 49CMUMir099231; Sat, 12 Oct 2024 22:30:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49CMUMFE099228; Sat, 12 Oct 2024 22:30:22 GMT (envelope-from git) Date: Sat, 12 Oct 2024 22:30:22 GMT Message-Id: <202410122230.49CMUMFE099228@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: 54416c6e1379 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 54416c6e137980197ee7a3cdc124174642f32af2 Auto-Submitted: auto-generated The branch stable/14 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=54416c6e137980197ee7a3cdc124174642f32af2 commit 54416c6e137980197ee7a3cdc124174642f32af2 Author: Kirk McKusick AuthorDate: 2024-10-03 15:05:42 +0000 Commit: Kirk McKusick CommitDate: 2024-10-12 22:30:06 +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 55f7d1175617..0f930ed5c03d 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); }