From nobody Thu May 16 23:44:38 2024 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 4VgRX669Ttz5KRp6; Thu, 16 May 2024 23:44:38 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VgRX65ch7z4CMb; Thu, 16 May 2024 23:44:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715903078; 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=K5cd+hjWwOM4lIsRCJn9ZqDB9rvFM/37tQp8+b4fK34=; b=hkeGAH/XiDMkJRgsFH2+Dz9GhDO4cU/cW4l4I0dmcHfC4CROyWOagXVAcD6P8xkIZ99Kmd mQzT/O4P1RSGa9PzgA27D3sPlCuVnrBEScuqXlmspJ1rzr8m2Q9uFzgLp4bDNdQ5xP8rKZ 7I3T13rIZC9YhJLXLkPdtMcN6DvlwXF9iYiaG5Z2FL8oxOIPy8Rk44JfNqzxnW0FtRSz7V /JS3vDBON1SONVezoOe4yRwXAVkxLYRU2wbrVrmA5mhUT0EgEEs3oBK3b7RmagkOinyxQq NJk1ZGEUvxRPT3NOcIM5esmtWGpK+8/k3IS/aW0pthyHfE/Y+vdbWjZBgs7wbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715903078; a=rsa-sha256; cv=none; b=Rs3ETyUT1b+LOrlgXTzVAh9/2hDcFgD8wY4PuIdOFbHSn0+zNtQIW3qeaB4WT+IutX9Gzr 8QHQlMyGkWMMQDCJrMgDButsvKM+NxBnANQ9ZKjYNdoMWNwOlvEbIfjQrX+k//C/2RW/qQ kO2fy+Mc/gs5q8G0YDQdL4Nm9k7hL3MACHZszhvGWS8sqj8HP0o5/u74iMwtCByGQgoye9 44gHfpiELWSXBS6vrx5APzLv0tbVSe3JfwJnQg5hGsKajwRLPuOc/DQAnqenpT6C8o1PNa Bq01UWA7f6Ek90oI3ijJZzYZGuWoCKkInrf5X1s1e9s1QJE7l8Tw12JPpT99XA== 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=1715903078; 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=K5cd+hjWwOM4lIsRCJn9ZqDB9rvFM/37tQp8+b4fK34=; b=xm9G8wl+idi2hnabGlH5mdOBj2BCbWyqk+aWYXjaOhMCnRZ82D2dDwfGJ17iuuxemP/j/K 3+NpaIbFdjH3Fghm6L6N+wjrfGlwgGaK5+N4WG1bObtugtNj3/u30QPY3ENm0CS0dxe2v3 MlaYH4r+JM12ZH6JS3/tPhc371TRCdb/aiK32Sgk16QEOxC5ksFQijmd6tyQtjqIkhtvEe 3bm1R/AKUsl7nYEI0jmI1MrybgHNzV/FROG493rEwIEElKAPmC+izNOd8Ufejy7ZsOwp+s /JiLctCrIUuI0UphDHYYHD07xBqBEhElEesDxIdcff0OisFTi4GTHhx6w/I+/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VgRX65CQSzJrF; Thu, 16 May 2024 23:44:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44GNicq0094379; Thu, 16 May 2024 23:44:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44GNic9B094376; Thu, 16 May 2024 23:44:38 GMT (envelope-from git) Date: Thu, 16 May 2024 23:44:38 GMT Message-Id: <202405162344.44GNic9B094376@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: 6b2af2d88ffd - releng/14.1 - Enable soft updates by default for UFS2 filesystems. 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: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 6b2af2d88ffdcae1f50c6e821ce83eb5f5f97fef Auto-Submitted: auto-generated The branch releng/14.1 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=6b2af2d88ffdcae1f50c6e821ce83eb5f5f97fef commit 6b2af2d88ffdcae1f50c6e821ce83eb5f5f97fef Author: Kirk McKusick AuthorDate: 2024-05-15 05:38:35 +0000 Commit: Kirk McKusick CommitDate: 2024-05-16 23:43:01 +0000 Enable soft updates by default for UFS2 filesystems. Differential Revision: https://reviews.freebsd.org/D45201 (cherry picked from commit 61dece6d27fb2436928ca93d65667b358e05aa7b) (cherry picked from commit 7465f9fc06467e57d3bbf2430031fe51d8182c30) Approved by: re (Colin Percival) --- sbin/newfs/newfs.8 | 6 +++++- sbin/newfs/newfs.c | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8 index e1496af814ca..0dc93cb8b78d 100644 --- a/sbin/newfs/newfs.8 +++ b/sbin/newfs/newfs.8 @@ -27,7 +27,7 @@ .\" .\" @(#)newfs.8 8.6 (Berkeley) 5/3/95 .\" -.Dd October 21, 2022 +.Dd May 18, 2024 .Dt NEWFS 8 .Os .Sh NAME @@ -100,6 +100,10 @@ The default format is UFS2. For backward compatibility. .It Fl U Enable soft updates on the new file system. +Soft updates are enabled by default for UFS2 format file systems. +Use +.Xr tunefs 8 +to disable soft updates if they are not wanted. .It Fl a Ar maxcontig Specify the maximum number of contiguous blocks that will be laid out before forcing a rotational delay. diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index afb71f9f25b4..c96e414b85dd 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -395,6 +395,9 @@ main(int argc, char *argv[]) fprintf(stderr, "because minfree is less than %d%%\n", MINFREE); opt = FS_OPTSPACE; } + /* Use soft updates by default for UFS2 and above */ + if (Oflag > 1) + Uflag = 1; realsectorsize = sectorsize; if (sectorsize != DEV_BSIZE) { /* XXX */ int secperblk = sectorsize / DEV_BSIZE;