summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2002-10-19 05:36:48 +0000
committermckusick <mckusick@FreeBSD.org>2002-10-19 05:36:48 +0000
commitcedf84e6070b1f93f3abe7c9b280fa6351d0cf59 (patch)
tree0d61b33ce5db96a7878a15c4536578fa24e65b6e /sbin/fsck_ffs
parent9d60b8c5426660a1791edeafa40b89335d706633 (diff)
downloadFreeBSD-src-cedf84e6070b1f93f3abe7c9b280fa6351d0cf59.zip
FreeBSD-src-cedf84e6070b1f93f3abe7c9b280fa6351d0cf59.tar.gz
Clear the pending counts in the superblock after a successful run
of fsck so that the kernel does not complain about them being non-zero when the filesystem is mounted. Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sbin/fsck_ffs')
-rw-r--r--sbin/fsck_ffs/fsutil.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/fsck_ffs/fsutil.c b/sbin/fsck_ffs/fsutil.c
index 705426a..60b455b 100644
--- a/sbin/fsck_ffs/fsutil.c
+++ b/sbin/fsck_ffs/fsutil.c
@@ -315,8 +315,11 @@ ckfini(int markclean)
errx(EEXIT, "panic: lost %d buffers", bufhead.b_size - cnt);
pbp = pdirbp = (struct bufarea *)0;
if (cursnapshot == 0 && sblock.fs_clean != markclean) {
- if ((sblock.fs_clean = markclean) != 0)
+ if ((sblock.fs_clean = markclean) != 0) {
sblock.fs_flags &= ~(FS_UNCLEAN | FS_NEEDSFSCK);
+ sblock.fs_pendingblocks = 0;
+ sblock.fs_pendinginodes = 0;
+ }
sbdirty();
ofsmodified = fsmodified;
flush(fswritefd, &sblk);
OpenPOWER on IntegriCloud