From nobody Wed May 22 19:22:31 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 4Vl1Qv6bkpz5KYP5; Wed, 22 May 2024 19:22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl1Qv68c8z40FS; Wed, 22 May 2024 19:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716405751; 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=HYVIMLfSVQQeN8rQ4DZGei+hA/KQZdqb4MSvXmizfps=; b=J11Q0tRwaVF07Evx3vqUtMFYrlrPMzTbiKv9tTTYxFVNY6HaarJGnBx015u5Pak//WdO+5 f6tYkYH4oX0Ti0HXH31jidkUEHf1oRVJrzsVNaPZJbJ0//vXk1xWKB+erIL7As1Ed+/+D7 CjLpsaV2dVbPKfSZyD4p7h608MkG6/Ec2934hFeMXx8ZhKYN2Z23hh40Rz6ENPKvhxaPvw UgpiAZ9cYHlE1sHoFPvu5hpy0WtDG3lNacLJK2X73TDnZzIyzpIiefw2wUPhc5YMLCS8Yx O5RQDAzLPV5vk7UBZIEE/9pM/OgmmKlrKuM9BOGxQrILZY8/Vo4JZzb7kK764g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716405751; a=rsa-sha256; cv=none; b=tPYT3P8PLYzpgPWkCeZgkqhnvR7hO08FgLeiNEw1jf7zbCtHwp0aVptdEApWvAH3ocycwo OzJoaWSuFYooT4SCLFg64gDsvfq3Ct4EBocQs/YcUkNmr7NdrgokBine/TGonNTKf3fhAl ZnTFC5e4qOqWj17ONpwv2kt2jG9lsRvm/qRUG0Kjpd7zoYMWnDuJ+vKuvdqopzgqFV877N NlPYdRCvbJ1bKA1pQTuVr5m42fHk2TYMyyzA6sJ8PhGX9EcWgkMI0K9pyFC/6Z3SNNJ6FL SC9BPlanwpxKsyk+xdeqmoAfVBxTEwN5ms52PwtZcckWKRXItsWIq8jM3ZQsQg== 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=1716405751; 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=HYVIMLfSVQQeN8rQ4DZGei+hA/KQZdqb4MSvXmizfps=; b=uLBGVHj/apWfO0H3TOLMpqYkbzwTMOmtKblCGH5pa4g1BQQx2QF5znxB7HPwI/vt84pjvs TBWzhqj7THmBYNqBZKnrWm5WPQG+YNxwhYaecmBL5aLyo/ikSkl85dlDfhcFNy4GXRynhF EPmN2JITZkoMcZjD3osZ7nN/rEUDcdz4t64zoRT/TFVOhpUtRFOWccMmGW1DBFatqbZtVP 3ETzz0ml6yPIJtRBaInZhG2p2ipLMBIt1iDN4aeiWRuY48Cc/MifGMY1vPdDOQ1jIdcMU3 XD/5nvMYz+FQJX4bWVIIddDpLghrnTI7kITHpzXD0kOhS/OPccVPV40XammOhw== 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 4Vl1Qv5ly3zJRg; Wed, 22 May 2024 19:22:31 +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 44MJMVXV012106; Wed, 22 May 2024 19:22:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MJMVjC012103; Wed, 22 May 2024 19:22:31 GMT (envelope-from git) Date: Wed, 22 May 2024 19:22:31 GMT Message-Id: <202405221922.44MJMVjC012103@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: 017d52e38ab3 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 017d52e38ab332b140ab40231ef920bcc3b2b1c1 Auto-Submitted: auto-generated The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=017d52e38ab332b140ab40231ef920bcc3b2b1c1 commit 017d52e38ab332b140ab40231ef920bcc3b2b1c1 Author: Kirk McKusick AuthorDate: 2024-05-15 05:38:35 +0000 Commit: Kirk McKusick CommitDate: 2024-05-22 19:22:14 +0000 Enable soft updates by default for UFS2 filesystems. Reviewed-by: Warner Losh, kib Differential Revision: https://reviews.freebsd.org/D45201 (cherry picked from commit 61dece6d27fb2436928ca93d65667b358e05aa7b) --- sbin/newfs/newfs.8 | 8 +++++--- sbin/newfs/newfs.c | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8 index 915304caaa40..0b9f66a7e76d 100644 --- a/sbin/newfs/newfs.8 +++ b/sbin/newfs/newfs.8 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)newfs.8 8.6 (Berkeley) 5/3/95 -.\" -.Dd October 21, 2022 +.Dd May 18, 2024 .Dt NEWFS 8 .Os .Sh NAME @@ -100,6 +98,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 1db317766692..6e69a6c5437b 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -391,6 +391,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;