From nobody Sat Apr 4 08:59:31 2026 X-Original-To: dev-commits-src-branches@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 4fnqKJ0xbpz6YGWR for ; Sat, 04 Apr 2026 08:59:32 +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 4fnqKH5MGLz3L7R for ; Sat, 04 Apr 2026 08:59:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775293171; 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=KGwR2f5qmeEKbw0rz+GpGiArsv3mNCkzogO5u2/mR6Q=; b=lFbo4BumkMHQ6SSegAuNzxqdjPsNBmiHDlnhcdRyDu8Qb8GgQjBN5QRI/tRG9lMIt6F50Z tNHQB5cNPiDHfCm6AOzdGZuxUj7ddraADbLXm8kIYmpLqC7B2LRuCKdIBRxvcPa8OLlq+Z kmrhMXKGMygmgiVyQ9D/GEyFvD75UHB/0ac8QE7VkIHZYzS1djn+QpiuiMPlPIoR/Z49WR CeZ29Vg/ERRL/XvwUxrd2ww02ZmiP/DkJk11Fmo4M/o5iCiBnkXdgj24sQ2bVWP4kL2GOJ FAWLYtk1hf62AdZOPKYK+qqFdRrZjZefU9lwBJHgCV6mOEgl+Rbl+RMyu5RpBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775293171; a=rsa-sha256; cv=none; b=QKSOLDVvO8HL8e+ormjoibAT1YT1qwYXPcwHPRBDlzyqhta6kqzMBpwYoWikDZ4rMT3v1v t0FE6XrB4KMD9vazWyCyyABy6NxzEKe1iKvy+/zrDhYO4yt2el8254U0jzqMt0tzxCt+Vt oNxb1JTwXSSfVkzTDGC4VZzn5QEawzy/GWspu2y9x8JVjXqk/hWjD7LEejsJVij1Jp99L8 61Lt50sJaGeZ7tkNSqRZBztICe87hZbc/xkMxYSMEFWfxY5MtRBMyLmW4HegTR3NgDfJpt zvt+f1RTvEj/HB4DvOfn/2kogH8FfWQsTj8ZKHskWiaa1byfvmW8P3TfOCCkTg== 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=1775293171; 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=KGwR2f5qmeEKbw0rz+GpGiArsv3mNCkzogO5u2/mR6Q=; b=HhZAjN31nawvKMsaChQzzyhufyHrhuYbbKD4iC/lVt/gQSNgY6JMX59vAJKPjH2BGO+9CW THydkXepvTZHhbdSkVwQFiIHOb33c4oywCJxdL/b2xMnDiDQRJzx0NuYilIi99K930pwTX jB95WTevOXOX8XaSj6xWBeSfBTAeSi+OyDlZ7p36eXEBll6/xzjoW8lAWy+YXgWCQi6VDT e0GCKU0FbNkb8k/O0LaLG7MW6b/0J1gajNib6OyJkvcNnTl2Dwv6lbSMSGhKA/sIZUSllv BGhJMZlo7aDFpBXSbA0Dy+K06W/RtBx73i3F3OhcJCsgeqbN4443AwBnQMv29w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnqKH46rWz1RC1 for ; Sat, 04 Apr 2026 08:59:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3644b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 08:59:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 94c236b7d806 - stable/14 - newfs: Don't combine GEOM journaling with SU List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 94c236b7d806d676d485d0c55a1924af417e70d1 Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 08:59:31 +0000 Message-Id: <69d0d2f3.3644b.6ac431cd@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=94c236b7d806d676d485d0c55a1924af417e70d1 commit 94c236b7d806d676d485d0c55a1924af417e70d1 Author: Dag-Erling Smørgrav AuthorDate: 2026-03-21 07:21:28 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-04 08:59:25 +0000 newfs: Don't combine GEOM journaling with SU GEOM journaling shouldn't be used at the same time as soft updates, so don't enable soft updates if GEOM journaling has been requested, and error out if both are explicitly requested. MFC after: 1 week PR: 293896 Reviewed by: mckusick Differential Revision: https://reviews.freebsd.org/D55999 (cherry picked from commit e30fcdaae2e68458da83d5420e6034c5f384e5f2) --- sbin/newfs/newfs.8 | 14 ++++++++++---- sbin/newfs/newfs.c | 4 +++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8 index 7336dbbc6e23..e091d7a53806 100644 --- a/sbin/newfs/newfs.8 +++ b/sbin/newfs/newfs.8 @@ -27,7 +27,7 @@ .\" .\" @(#)newfs.8 8.6 (Berkeley) 5/3/95 .\" -.Dd January 7, 2026 +.Dd March 20, 2026 .Dt NEWFS 8 .Os .Sh NAME @@ -86,6 +86,8 @@ Enable journaling on the new file system via gjournal. See .Xr gjournal 8 for details. +This is incompatible with soft updates +.Pq Fl U . .It Fl L Ar volname Add a volume label to the new file system. Legal characters are alphanumerics, dashes, and underscores. @@ -100,12 +102,14 @@ The default format is UFS2. For backward compatibility. .It Fl U Enable soft updates on the new file system. +This is incompatible with GEOM journaling +.Pq Fl J . If neither .Fl U nor .Fl u is specified, soft updates are enabled by default for UFS2 format file -systems and disabled otherwise. +systems unless GEOM journaling was requested and disabled otherwise. .It Fl u Do not enable soft updates on the new file system. If neither @@ -178,8 +182,10 @@ One inode is required for each distinct file, so this value effectively specifies the average file size on the file system. .It Fl j Enable soft updates journaling on the new file system. -This implies -.Fl U . +This implies soft updates +.Pq Fl U +and is incompatible with GEOM journaling +.Pq Fl J . This flag is implemented by running the .Xr tunefs 8 utility found in the user's diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 754606707178..108a66b11581 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -400,7 +400,9 @@ main(int argc, char *argv[]) } /* Use soft updates by default for UFS2 and above */ if (Uflag < 0) - Uflag = Oflag > 1; + Uflag = Oflag > 1 && !Jflag; + if (Uflag && Jflag) + errx(1, "Cannot enable both soft updates and GEOM journaling"); realsectorsize = sectorsize; if (sectorsize != DEV_BSIZE) { /* XXX */ int secperblk = sectorsize / DEV_BSIZE;