diff options
author | Kirk McKusick <mckusick@FreeBSD.org> | 2021-03-25 00:23:33 +0000 |
---|---|---|
committer | Kirk McKusick <mckusick@FreeBSD.org> | 2021-04-02 21:55:58 +0000 |
commit | 343b9e6219e1579efe8980612655ec52d61b0d57 (patch) | |
tree | b2d5fd5b0aee8903292cdcdf0cde73fcb81c6b51 | |
parent | fab7c18ce3229d53b732fdfdbb6e9a1a1c72739a (diff) |
Fix fsck_ffs -R finds unfixed duplicate block errors when rerunning.
(cherry picked from commit 7848b25edd2a513f115de6d91f0a5a8d8fa1aa58)
-rw-r--r-- | sbin/fsck_ffs/inode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c index 60019425c825..020a69dd72f8 100644 --- a/sbin/fsck_ffs/inode.c +++ b/sbin/fsck_ffs/inode.c @@ -600,6 +600,9 @@ setinodebuf(int cg, ino_t inosused) nextino = inum; lastinum = inum; readcount = 0; + /* Flush old contents in case they have been updated */ + flush(fswritefd, &inobuf); + inobuf.b_bno = 0; if (inobuf.b_un.b_buf == NULL) { inobufsize = blkroundup(&sblock, MAX(INOBUFSIZE, sblock.fs_bsize)); |