git: 56d80e35a333 - stable/12 - growfs: allow operation on RW-mounted filesystems
Ed Maste
emaste at FreeBSD.org
Sat Mar 6 01:13:29 UTC 2021
The branch stable/12 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=56d80e35a3338e10e7670823f264cd82443c9d1e
commit 56d80e35a3338e10e7670823f264cd82443c9d1e
Author: Ed Maste <emaste at FreeBSD.org>
AuthorDate: 2021-03-02 22:35:48 +0000
Commit: Ed Maste <emaste at FreeBSD.org>
CommitDate: 2021-03-06 01:13:09 +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
Fixes: 6eb925f8450f ("Filesystem utilities that modify the...")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29021
(cherry picked from commit 0dcde5cc12744e5188300711a8829e5e6a9cd0de)
---
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 919ce86cc7b6..d1e42ed7c3d0 100644
--- a/sbin/growfs/growfs.c
+++ b/sbin/growfs/growfs.c
@@ -1443,10 +1443,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);
More information about the dev-commits-src-all
mailing list