Debugging output additions. No functional changes intended.

MFC-after:    1 week
Sponsored-by: The FreeBSD Foundation
This commit is contained in:
Kirk McKusick 2023-07-25 14:02:33 -07:00
parent 437e1e37df
commit 4d512b0735

View file

@ -438,7 +438,7 @@ checkfilesys(char *filesys)
/*
* 1: scan inodes tallying blocks used
*/
if (preen == 0) {
if (preen == 0 || debug) {
printf("** Last Mounted on %s\n", sblock.fs_fsmnt);
if (mntp != NULL && mntp->f_flags & MNT_ROOTFS)
printf("** Root file system\n");
@ -457,7 +457,8 @@ checkfilesys(char *filesys)
preen ? "-p" : "",
(preen && usedsoftdep) ? " AND " : "",
usedsoftdep ? "SOFTUPDATES" : "");
printf("** Phase 1b - Rescan For More DUPS\n");
if (preen == 0 || debug)
printf("** Phase 1b - Rescan For More DUPS\n");
pass1b();
IOstats("Pass1b");
}
@ -465,7 +466,7 @@ checkfilesys(char *filesys)
/*
* 2: traverse directories from root to mark all connected directories
*/
if (preen == 0)
if (preen == 0 || debug)
printf("** Phase 2 - Check Pathnames\n");
pass2();
IOstats("Pass2");
@ -473,7 +474,7 @@ checkfilesys(char *filesys)
/*
* 3: scan inodes looking for disconnected directories
*/
if (preen == 0)
if (preen == 0 || debug)
printf("** Phase 3 - Check Connectivity\n");
pass3();
IOstats("Pass3");
@ -481,7 +482,7 @@ checkfilesys(char *filesys)
/*
* 4: scan inodes looking for disconnected files; check reference counts
*/
if (preen == 0)
if (preen == 0 || debug)
printf("** Phase 4 - Check Reference Counts\n");
pass4();
IOstats("Pass4");
@ -489,7 +490,7 @@ checkfilesys(char *filesys)
/*
* 5: check and repair resource counts in cylinder groups
*/
if (preen == 0)
if (preen == 0 || debug)
printf("** Phase 5 - Check Cyl groups\n");
snapflush(std_checkblkavail);
if (cgheader_corrupt) {