freebsd-nq/sbin/fsck_ffs
Kirk McKusick e155208020 Fsck would find, report, and offer to fix inode check-hash failures.
If requested to fix the inode check-hash it would confirm having done
it, but then fail to make the fix. The same code is used in fsdb which,
unlike fsck, would actually fix the inode check-hash.

The discrepancy occurred because fsck has two ways to fetch inodes.
The inode by number function ginode() and the streaming inode
function getnextinode() used during pass1. Fsdb uses the ginode()
function which correctly does the fix, while fsck first encounters
the bad inode check-hash in pass1 where it is using the getnextinode()
function that failed to make the correction. This patch corrects
the getnextinode() function so that fsck now correctly fixes inodes
with incorrect inode check-hashs.

Reported by:  Gary Jennejohn <gljennjohn@gmail.com>
Sponsored by: Netflix
2018-12-15 17:32:47 +00:00
..
dir.c In preparation for adding inode check-hashes, clean up and 2018-11-13 21:40:56 +00:00
ea.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
fsck_ffs.8 Exit fsck_ffs with non-zero status when file system is not repaired. 2018-01-15 19:25:11 +00:00
fsck.h Ensure that cylinder-group check-hashes are properly updated when first 2018-12-05 06:31:50 +00:00
fsutil.c Make fsck(8) use pread(2). This cuts the number of syscalls by half. 2018-12-15 11:36:20 +00:00
gjournal.c In preparation for adding inode check-hashes, clean up and 2018-11-13 21:40:56 +00:00
globs.c Include files missed in 329051. 2018-02-08 23:14:24 +00:00
inode.c Fsck would find, report, and offer to fix inode check-hash failures. 2018-12-15 17:32:47 +00:00
main.c Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
Makefile sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
pass1.c Ensure that cylinder-group check-hashes are properly updated when first 2018-12-05 06:31:50 +00:00
pass1b.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
pass2.c In preparation for adding inode check-hashes, change the fsck_ffs 2018-10-31 05:17:53 +00:00
pass3.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
pass4.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
pass5.c Ensure that cylinder-group check-hashes are properly updated when first 2018-12-05 06:31:50 +00:00
setup.c Normally when an attempt is made to mount a UFS/FFS filesystem whose 2018-12-06 00:09:39 +00:00
suj.c Revert r313780 (UFS_ prefix) 2018-03-17 12:59:55 +00:00
utilities.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00