freebsd-dev/sbin/fsck_ffs
Chuck Silvers 4064755812 fsck_ffs: fix the previous change that skipped pass 5 in some cases
The previous change involved calling check_cgmagic() twice in a row
for the same CG in order to differentiate when the CG was already ok vs.
when the CG was rebuilt, but that doesn't work because the second call
(which was supposed to rebuild the CG) returns 0 (indicating that
the CG was not rebuilt) due to the prevfailcg check causing an early
failure return.  Fix this by moving the rebuild part of check_cgmagic()
out into a separate function which is called by pass1() when it wants to
rebuild a CG.

Fixes: da86e7a20d
Reported by:	pho
Discussed with:	mckusick
Sponsored by:	Netflix
2023-05-03 13:31:32 -07:00
..
dir.c Improvement in UFS/FFS directory placement when doing mkdir(2). 2023-03-29 21:13:27 -07:00
ea.c Clean up error output for extended attributes in fsck_ffs(8). 2022-11-07 14:32:42 -08:00
fsck_ffs.8 Correct the location of the first backup superblock in fsck_ffs.8. 2019-08-07 16:56:00 +00:00
fsck.h fsck_ffs: fix the previous change that skipped pass 5 in some cases 2023-05-03 13:31:32 -07:00
fsutil.c fsck_ffs: fix the previous change that skipped pass 5 in some cases 2023-05-03 13:31:32 -07:00
gjournal.c fsck_ffs: fix the previous change that skipped pass 5 in some cases 2023-05-03 13:31:32 -07:00
globs.c Skip Pass 5 in fsck_ffs(8) when corrupt cylinder groups remain unfixed. 2023-04-18 16:13:26 -07:00
inode.c fsck_ffs: fix the previous change that skipped pass 5 in some cases 2023-05-03 13:31:32 -07:00
main.c fsck_ffs: fix the previous change that skipped pass 5 in some cases 2023-05-03 13:31:32 -07:00
Makefile pkgbase: Put ufs related tools and lib in their own package 2022-10-26 19:46:34 +02:00
Makefile.depend Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
pass1.c fsck_ffs: fix the previous change that skipped pass 5 in some cases 2023-05-03 13:31:32 -07:00
pass1b.c Flush and close getnextino cache when done using it in Pass 1b. 2022-09-03 14:15:50 -07:00
pass2.c Improvement in UFS/FFS directory placement when doing mkdir(2). 2023-03-29 21:13:27 -07:00
pass3.c Improvement in UFS/FFS directory placement when doing mkdir(2). 2023-03-29 21:13:27 -07:00
pass4.c Rewrite the disk I/O management system in fsck_ffs(8). Other than 2021-01-07 15:03:15 -08:00
pass5.c Additional diagnostic output when running fsck_ffs with debugging flag (-d) 2022-10-30 15:00:20 -07:00
setup.c Correct several bugs in fsck_ffs(8) triggered by corrupted filesystems. 2023-03-07 15:14:47 -08:00
suj.c fsck_ffs: fix the previous change that skipped pass 5 in some cases 2023-05-03 13:31:32 -07:00
utilities.c Remove unused includes. 2019-12-22 05:44:29 +00:00