From nobody Sat Apr 4 08:59:25 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 4fnqK95kvtz6YGWJ for ; Sat, 04 Apr 2026 08:59:25 +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 4fnqK953Xdz3LJF for ; Sat, 04 Apr 2026 08:59:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775293165; 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=mstTyRn4+6HQBx02cSQ+Bj+h8Fk15ikNE1tqvG68IlrrbfXJvZkj1mpbciYUh4peRCSus0 G9t+Q0K3asJoIzNI/eLpD2582aGHvEsJgBQIJ6GSabY6ScVDufD3uGB6c4NpCCM7jA2pD2 /hYoTcM9LDxoOupYhrWhiRPsVMUZdGLAaHlL9sewipZeRYi3XhKTQsH3596eAMO6NI5t+5 2AWt6C1+c4+S/tR9pW5bM42c1mSxeX7+6RWOgwu9CQk6FYlqIfROz0Ans70U0QoQpNLPnu 8VcPvhHUsAmHtuZ8e55XyVZ1R5bgWpbocBjGS2VEL853Dx+Vhw+xZLj21HEm6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775293165; a=rsa-sha256; cv=none; b=FcgqfqMx/C+MlGdba1+7vqQonegRh1+c+f0NErA0fOJfVI+VxlyaF3KWz92ie20bKKGU7N rUI7S+IP+hb0CAWOshuvbN3e5etM/iaPGc74n71wh9PzcCcE+zuoD1ijBi873YVi79mznk oA267k/Oe7OFZeVYm+v5luU8Z41oVXhWkHx+8WZGtXppJg1qhjb2I+W5tp2lkiOhiHBVhz D9Z6GkJ9w0HMPRmUAuVx239+0WiiJ0FxF6WIkp+sx4h+w9pKqSYpEL6YCYtOfBB7BHvg2w X24fx/wm6wD4WbOkkA9iwMc3QWlxh/KZvE/f4iyApuit+CKSrzb7Ex0Zlf6d6A== 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=1775293165; 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=UEDNPIOq2zrirL67pbdeBwyKTjQg9zJToHMTvwQ+DnLH/fSMGet4GWLrZmsblYZCpnbdNF fFYK+STeOyaAh7dpbq+VnVQaqWqUOtDL9hrqfHZe3O2Rl5ROXH6HGP9bUyPB4+PoMKeDUk vrdcirEqNdg0maSE9lyVF8EymbN2Zpmmdx1JxvaXHIQmJpF0t+46SgJ3DEm3+Go87h0c+D zC/TcHjNNdJr7YLsywsJvrP+RwZJfXJQ6LJARp0W5Cp2rl/wVfKzBKFwatbRxCJKvUK2lc rEWYdB9Qpmvds9VPdTvbIAjjdjPOhb0uPdX95dme26kDKVL/XiLz991x1Lc1Hg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnqK94PtXz1QkC for ; Sat, 04 Apr 2026 08:59:25 +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: 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/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;