Files
src/sbin
Kirk McKusick da86e7a20d Skip Pass 5 in fsck_ffs(8) when corrupt cylinder groups remain unfixed.
Pass 1 of fsck_ffs checks the integrity of all the cylinder groups.
If any are found to have been corrupted it offers to rebuild them.
Pass 5 then makes a second pass over the cylinder groups to validate
their block and inode maps. Pass 5 assumes that the cylinder groups
are not corrupted and can segment fault if they are corrupted. Rather
than rerunning the corruption checks a second time in pass 5, this
fix keeps track whether any corrupt cylinder groups were found but not
fixed in pass 1 either due to running with the -n flag or by explicitly
answering `no' when asked whether to fix a corrupted cylinder group.
If any corrupted cylinder groups remain after pass 1, fsck_ffs will
decline to run pass 5. Instead it marks the filesystem as unclean
so that fsck_ffs will need to be run again before the filesystem can
be mounted.

This patch cleans up and documents the return value from check_cgmagic().
It also renames the variable / parameter "rebuildcg" to "rebuiltcg".
This parameter describes whether the cylinder group has been rebuilt
rather than whether it should be rebuilt.

Reported by: Chuck Silvers
Reviewed by: Chuck Silvers
MFC after:   1 week
2023-04-18 16:13:26 -07:00
..
2023-04-03 16:49:30 +02:00
2023-02-07 10:43:40 +03:00
2022-07-18 22:06:15 +00:00
2022-11-03 00:20:12 +01:00
2022-05-07 09:55:40 -06:00
2023-01-15 10:21:31 -08:00
2023-01-15 10:21:31 -08:00
2023-04-18 11:22:28 -07:00
2021-12-07 11:40:22 +01:00
2022-01-08 12:45:46 +02:00
2023-02-13 00:32:38 -06:00
2021-09-11 20:04:52 +08:00
2022-12-12 08:19:51 -08:00
2023-04-03 22:48:49 +03:00
2023-03-01 14:38:46 -06:00
2023-01-15 10:21:31 -08:00
2023-01-26 21:13:16 -05:00