Date: Sat, 15 Dec 2018 17:32:48 +0000 (UTC) From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342128 - head/sbin/fsck_ffs Message-ID: <201812151732.wBFHWmi8049765@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mckusick Date: Sat Dec 15 17:32:47 2018 New Revision: 342128 URL: https://svnweb.freebsd.org/changeset/base/342128 Log: 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 Modified: head/sbin/fsck_ffs/inode.c Modified: head/sbin/fsck_ffs/inode.c ============================================================================== --- head/sbin/fsck_ffs/inode.c Sat Dec 15 17:01:16 2018 (r342127) +++ head/sbin/fsck_ffs/inode.c Sat Dec 15 17:32:47 2018 (r342128) @@ -309,6 +309,8 @@ ginode(ino_t inumber) if (preen || reply("FIX") != 0) { if (preen) printf(" (FIXED)\n"); + ffs_update_dinode_ckhash(&sblock, + (struct ufs2_dinode *)dp); inodirty(dp); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812151732.wBFHWmi8049765>