From nobody Sat Apr 4 08:59:40 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 4fnqKT213yz6YGYM for ; Sat, 04 Apr 2026 08:59:41 +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 4fnqKT09K2z3LJN for ; Sat, 04 Apr 2026 08:59:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775293181; 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=Z/i44Af86ddTTx1FyY2mIj9uIrRgQk6tm4aLS0keUOU=; b=UXF77wtc3ZRD6PQPpExVEVQMOL+GCyo2PbJCU0uxCI+yr6+k48yivwDbk6YuxB7yuYhKOg Z9krFeU6LgK/YWAeMBmikeGBuEfLAmBDWGLAIJVAYCO5rHJy3daYIRGHLNbVfsqx4vXFXk miw3xaElqvM9DYSdpwh5C95A472Im6ktq5a0vmHcz+2V9V4VPW45s6kZRMqhB3xohU+nS0 uamjwBOX6AFBoSBLtQq1V10GEzxwGNaoVFqzpl4a+jI8Up2qWp3NdoIxieSK10FXhcCr14 xaix/Dk5/X9Cgnc6NkUHutgiWq4KiCeI6g6oH83qK6JKIgw1owgVv/aWSykW+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775293181; a=rsa-sha256; cv=none; b=IZLTyue6P/jH8i8fnoOTHIR0Y1euImP/X05cXiY2/8bVy70NbqRijRpzYRyi03xvnz0OHN xrKPB+0uudX9y/eiRY+7kKD7tOEc1f4lOiKAB0RXsH0/PcUKZJyuohkFCLqNQMwqnCY/0q GhDVLRvz2RrpE4L/DaFV+n+2j/dphkpsWiOmE+BaHq4ANLXM6TD1MYTbkMefUsPhKvU3LY itZj/LEeSs4G1wVYx2s9pI/u/6qtVk2nqbXAkqMDpCjxBP47IPQeJbC9O2+tV+bly8Qv7j yJe/Jnmh9TE0lJLA5mRCxT09IpzjDvcIknTgmKTsDFB+Yb+ZPecMcx8vPQU9OQ== 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=1775293181; 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=Z/i44Af86ddTTx1FyY2mIj9uIrRgQk6tm4aLS0keUOU=; b=w09EbrT/J4XdH/ItqQ+oKgL1jvmgV2kcEFOydKjfwGnovmzn/SZIcbuFgD/PAVzAPPuJ37 teIOXW3JTHUMfPRTE30C9t1nZRq8SQvLYlkEk8wudvw+zAD+mS+mHMYK5CixxwD2dEO6Hr UkDIShoQ5NFiTJ1OPCWWP5uriulF2aGrNI113Cid7By80TaOGYhQyZHbQ2v3tmW9DyDqjo b/T5Ge5z3r72dwI/gxVQzUwPYPW8yuQBlztq0qF0LeRJ5+ROCI/QlAH0ySuMQiFK28dKQn MqLnDE7SiKOoKoU5R2U+dpiLWjNZg69ELIIsTTw7F9rPkL25uTySv6Y/pNzSdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnqKS6npqz1R1D for ; Sat, 04 Apr 2026 08:59:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36b49 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 08:59:40 +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: a4b2be2f6a9a - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: a4b2be2f6a9a155c56c876aabf3175301c4a84de Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 08:59:40 +0000 Message-Id: <69d0d2fc.36b49.27fbdc6d@gitrepo.freebsd.org> The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a4b2be2f6a9a155c56c876aabf3175301c4a84de commit a4b2be2f6a9a155c56c876aabf3175301c4a84de Author: Dag-Erling Smørgrav AuthorDate: 2026-03-21 07:21:28 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-04 08:59:33 +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 de69cc30dc16..ab9058b7672c 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 27b6c079bc0f..378a7dbace93 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -396,7 +396,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;