From nobody Sat Mar 21 07:22:08 2026 X-Original-To: dev-commits-src-main@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 4fd9qN6SBlz6Wkyf for ; Sat, 21 Mar 2026 07:22:08 +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 4fd9qN4LC3z3tqv for ; Sat, 21 Mar 2026 07:22:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774077728; 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=YNKkc8Waz8T1/Zi0OM+hHQlLUPE9cRM6tpvQ0zXgwrs=; b=UvVnDyckD4f0zxDYSlItXF3e+QlfbyjcYonQehGP+rMmyO2jd51lKlEwcVuB+XYUlt8+P8 Xjh+LvQ3uMUbN/k0pOE8WTrniCtqR+hkv4MAbJPPVgfPBO0qL3DxtQh2D2Q2RcqlFlpMGx /1DGGyLLmrv1eQUIM4CMHwu1FSlXs+t9H2NgtM841q4d6kGXMHALmIoQJe6o+dIgOtyExH g0aN63OqxI1mvYv/fnHQCzljS5p/+CRpWRn0w8KaEjtmPGjSBN1NFIIDIG1hG0IWU99evR er2z4xPOtZf7UELwMWz8W49CF2Z/krgYwkGgVhgWAKOmF6/AMCjgwOPI0b5bUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774077728; a=rsa-sha256; cv=none; b=wheFbGltIlEYkRCafUPo3RO/YgPMu11aViB5OOb+fpZPCdWx99iERSpJRgGqmnXKi6nJCD YeU+F871lx2IoNY7hPK9qZX9nDjRuPdea4OI8Vxo0KDKis3Df5XVr3DPT+LqQ4vwfoPq9m iCE7IykOL37KdxVhZlnWg5xsB3BXQ9JQO+YHwkr0/iFkzg8E2BT1q+92oLtoQAYF4hTNxI HGxPxNFIZfSlZIWD5B6QVX78BQgKi9fVOI7+A+RiWVjtT5vt1z/Ce3KyQD2N+HaVwLfpCl C4L9RnFbfBllPEaMCS0JXnCD23bRU4KfqGEBeXyKRPmZ2X1bkEQQyWPAScI/9A== 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=1774077728; 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=YNKkc8Waz8T1/Zi0OM+hHQlLUPE9cRM6tpvQ0zXgwrs=; b=ITBK/881dE8tSCYt3ck5wfaWDXbVoWL3RGxd3rbDmSmKLWpDWjBWV6IVx3vP0DzClVhMPq jpRhwbvzFeF1yU29eFFACmIF/PeIUF9Ts8aB+/6KLnhUqsbUQeXdtaPkcX+XCGw18PFXHW lWcNpUWDFdjaIhvz3oMmaZKZ9rUhh35Y+1XEFBCqAu04q9AC8dx/eFaD3zYIea+8BeWq9S 9WEZcXkqeZjn8qD1AZIIwvAkmGOlwb7AfgAnKsDRj6Z8V5ZPynEhvYU990xygcGmpTH9Hq +LS4UazXmwzhIaR/lgY+ZX6h/QBdyA8MilEsazYaB2b3gjx54ND4n1Nlmh5/Ng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fd9qN3tdyz12l8 for ; Sat, 21 Mar 2026 07:22:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cbc6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 21 Mar 2026 07:22:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: e30fcdaae2e6 - main - newfs: Don't combine GEOM journaling with SU List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: e30fcdaae2e68458da83d5420e6034c5f384e5f2 Auto-Submitted: auto-generated Date: Sat, 21 Mar 2026 07:22:08 +0000 Message-Id: <69be4720.3cbc6.53c57b53@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e30fcdaae2e68458da83d5420e6034c5f384e5f2 commit e30fcdaae2e68458da83d5420e6034c5f384e5f2 Author: Dag-Erling Smørgrav AuthorDate: 2026-03-21 07:21:28 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-03-21 07:21:45 +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 --- 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;