From nobody Sat Apr 4 08:59:25 2026 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 4fnqKH5RzRz6YGkW for ; Sat, 04 Apr 2026 08:59:31 +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 4fnqKG71xtz3L9Y for ; Sat, 04 Apr 2026 08:59:30 +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=bmfnn7zmzFF5aqCEhc/7pseMzv41i3on+qAmm27nSQI=; b=fZoF4LzeKc+H7WZca+Sblois8dV3D0PeTiwyjaE2fjaE2a11/KkYoBe3i1rMH9TPXaUMDQ u1G4ybBXXr1DAMHvesIir+eshQfWFsf7haHAsisYIcNybphmG9c/abiVVuKVhL+9uhwsoR CsSn9FDSRWUlPMbhVFK/WmOk0mYapMoclXG9+1p1+8ziDLwc1pDmHARWwAif46thZlA/3j LtptQuVU9tNuig6gN4f9FRW7KST2wnw3WrE5woilzZ3JGoI+M03PF8dx3PdRpbGjbV3pI/ 3z5hDGT/UWSDaX4Nrshe+CJz3jKOMAnGiWB5arBVrsJkhKPda8PbItFBYVtQrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775293171; a=rsa-sha256; cv=none; b=i8cnmvTJaVUMyNgWadOxgYRSBtncClb7zoIxQRhK8hGqHsXBNDP3g+YfCu97pDLKl9LXS7 dN9UxbQr7+zDug9S6vRbd400rg/AT58b8yshDOLjqWVUVD+RpxBpIKvELMVihcoke8oQIy p0pmLpHtFLe1+M67lgoY/5L3MozBFtlB+SaKGplbhsBcX62RKFr7fHf1obawVmuCujeJx1 BNJJrDTuwQLQfChG05/YXx7EmVx+TVBa4l0gFdVftzyBg3aNzi+RX/S2cj8OaBE41wkltg JrQPaqRsfLK/XvvytlHgtlJFVkRDWS2yxBU/TL07lNKWPfxDF+viY4EaL8InOg== 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=bmfnn7zmzFF5aqCEhc/7pseMzv41i3on+qAmm27nSQI=; b=IjIO3E+zgJcvTtJMb+Yvs7ti3hVERuIZahGRN4DfUJ7tzIFjQKdOLhKJIcdA3Z9PSOhq1o J1GxST+e8gQ8b7tZRY9kAwnM7/wpaYY1M/Xzec/cOvoFcuc2XtQUT70ed0oSukPDBZVjwf dpb5zVZWFNyzkLUweyn5cZSiHYPv5/jv+3jhkJpPCX13DKiyAyd2jrCczUmz5Z4aRN2su7 7U0vnySu0bUGEYSfezKvJ5p1UKIGnZO5XrpvnsTt96NnZpkpParkU6uEnM7+9DPqkuBHRY yuT6ezl983yEQ9c4fOpejPXz3cKfH2ZBWjgp82DAL6ErB8Kct8HHcYY6RGpsgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnqKG6Qgvz1RC0 for ; Sat, 04 Apr 2026 08:59:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3796b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 08:59:25 +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: f758262e66dd - stable/15 - newfs: Don't combine GEOM journaling with SU 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: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f758262e66dd14964da327de322286586f9edaf2 Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 08:59:25 +0000 Message-Id: <69d0d2ed.3796b.9b19f1c@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f758262e66dd14964da327de322286586f9edaf2 commit f758262e66dd14964da327de322286586f9edaf2 Author: Dag-Erling Smørgrav AuthorDate: 2026-03-21 07:21:28 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-04 08:59:14 +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 6416e0f0ec8d..3aa3890479bf 100644 --- a/sbin/newfs/newfs.8 +++ b/sbin/newfs/newfs.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 7, 2026 +.Dd March 20, 2026 .Dt NEWFS 8 .Os .Sh NAME @@ -84,6 +84,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. @@ -98,12 +100,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 @@ -176,8 +180,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 78f0bfcf458d..a54aae6ef6fc 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -390,7 +390,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;