From nobody Thu May 16 06:56:00 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 4Vg18K1nsYz5KjVQ; Thu, 16 May 2024 06:56:01 +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 4Vg18K103tz4HS5; Thu, 16 May 2024 06:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715842561; 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=Fv2aU/BbmI+K3K9cOwOjSo1DPibzdHZt+fMQgQ7RGA4=; b=rh708xk6MADXbsUkoZDw07yyOG0VFUNNK2et5ZXFVbSQs5HLCYjXr8dHtDRC0IUL8A5mRH UxQACeiPJq1sVxuKARdEgpxcOYEvEXd4zKYilo/0NkeFUTx435SMl1f2VMBb9gzXMNmQ15 HBjpPxcggcY4uckCdMf6y9gw7eB1T8jv6AeWb9fmOeonS+PQdwB7QqA7knUqXzAyXm/QU7 pqDlLP6lZoIwebgxHKpto3NNCEuoCRGcIqO26dNOu7/nM1chJBteYg06Zpu0bMKAT6Izsi OpgaO60XZY66E1UJ0RH/u3DMyhkMjGMHJy03NzuDfXViRFmFbYaXeOoaFHpn7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715842561; a=rsa-sha256; cv=none; b=yXCbxyGdr6XRthfdNhPUOyjWTSIf9wrhxwwsyND5TcCOx89YmFbhYkWrVllYNg7JWnVhkZ XoPlEgwvlKoIHOVnClvAPiPn6FamB5+1X75mFPsxYMu2TwTtJEcIWG7Z4AJ1RZGrDaCIfQ aDqv0DszWFMjMoxRi/TQYdtPmTw6/u7q5zVbfqmRb2sTk0uAgRGSpuyjymAIx8FouVkCco FBNC4p5Jd6wwIWwtDpzOGzY94dYYCvEQvK7AC7tp5kobNAROPtAZtBIg3BBLxbVAl9qCbl GdzvJ/XW8JUrCOJepeOIELCLzpoMseFAy6K9Uh5GYzLLDNqxuDmsmiUwuL0AkA== 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=1715842561; 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=Fv2aU/BbmI+K3K9cOwOjSo1DPibzdHZt+fMQgQ7RGA4=; b=VGR1s1UXcaFLUOt0W5QKZqBT2ZRn70XQ/v4jGc4FRBYScB/q4aymHOozzu00RgqhCGUqIH BP6NW/54vMWqGdvAzFq7eE6QZgoD9bUHxCtEL76iBZxP3dTOISNFiacB/q5XVoOdFp859l u1AeN6ann3UI9mQx+z9nHQLdEa2msGw8KXOktUEOV466nhS3NvFdgDM2k1hclVtDAzBx8j SApAKIdLC8AIgHqRqIWj75LwOsXuozbZ5/HRSGm5WS7kRSTRQ/PWHyhh0agYEvQbhDQ5zE e9YUMY4ysiDOWVkNNoTz88pRVkawT+gQ4YO0kVFCx19Zcl6k8X2cF6CRu/MJ2Q== 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 4Vg18K0SpXzpSY; Thu, 16 May 2024 06:56:01 +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 44G6u04k087135; Thu, 16 May 2024 06:56:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44G6u03n087132; Thu, 16 May 2024 06:56:00 GMT (envelope-from git) Date: Thu, 16 May 2024 06:56:00 GMT Message-Id: <202405160656.44G6u03n087132@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: 7465f9fc0646 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 7465f9fc06467e57d3bbf2430031fe51d8182c30 Auto-Submitted: auto-generated The branch stable/14 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=7465f9fc06467e57d3bbf2430031fe51d8182c30 commit 7465f9fc06467e57d3bbf2430031fe51d8182c30 Author: Kirk McKusick AuthorDate: 2024-05-15 05:38:35 +0000 Commit: Kirk McKusick CommitDate: 2024-05-16 06:55:44 +0000 Enable soft updates by default for UFS2 filesystems. Differential Revision: https://reviews.freebsd.org/D45201 (cherry picked from commit 61dece6d27fb2436928ca93d65667b358e05aa7b) --- 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;