From owner-dev-commits-src-all@freebsd.org Sat Mar 6 19:46:46 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFD1A5711F7; Sat, 6 Mar 2021 19:46:46 +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 4DtFVG61Bfz4lwy; Sat, 6 Mar 2021 19:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 C12201153; Sat, 6 Mar 2021 19:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 126JkklS019857; Sat, 6 Mar 2021 19:46:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 126JkkjE019856; Sat, 6 Mar 2021 19:46:46 GMT (envelope-from git) Date: Sat, 6 Mar 2021 19:46:46 GMT Message-Id: <202103061946.126JkkjE019856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 8d25741b633a - releng/13.0 - growfs: allow operation on RW-mounted filesystems MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 8d25741b633af6652fe8bfff1cb157a31e66cc60 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 19:46:46 -0000 The branch releng/13.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8d25741b633af6652fe8bfff1cb157a31e66cc60 commit 8d25741b633af6652fe8bfff1cb157a31e66cc60 Author: Ed Maste AuthorDate: 2021-03-02 22:35:48 +0000 Commit: Ed Maste CommitDate: 2021-03-06 19:46:31 +0000 growfs: allow operation on RW-mounted filesystems growfs supports growing mounted filesystems (writes are temporarily suspended while the grow happens). Drop the check for fs_clean == 0 to restore this case. Leave fs_flags check for FS_UNCLEAN or FS_NEEDSFSCK which represent the state of the filesystem when it was mounted, and fsck should be run first if they are set. PR: 253754 Reviewed by: mckusick Approved by: re (gjb) Fixes: 6eb925f8450f ("Filesystem utilities that modify the...") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29021 (cherry picked from commit 0dcde5cc12744e5188300711a8829e5e6a9cd0de) (cherry picked from commit b5920128c7ebcf5060605928263a54b31b317993) --- sbin/growfs/growfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index d1098210f088..510192dada0b 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -1461,10 +1461,9 @@ main(int argc, char **argv) } } /* - * Check for unclean filesystem. + * Check for filesystem that was unclean at mount time. */ - if (fs->fs_clean == 0 || - (fs->fs_flags & (FS_UNCLEAN | FS_NEEDSFSCK)) != 0) + if ((fs->fs_flags & (FS_UNCLEAN | FS_NEEDSFSCK)) != 0) errx(1, "%s is not clean - run fsck.\n", *argv); memcpy(&osblock, fs, fs->fs_sbsize); free(fs);