The branch stable/13 has been updated by mckusick:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=343b9e6219e1579efe8980612655ec52d61b0d57

commit 343b9e6219e1579efe8980612655ec52d61b0d57
Author:     Kirk McKusick <[email protected]>
AuthorDate: 2021-03-25 00:23:33 +0000
Commit:     Kirk McKusick <[email protected]>
CommitDate: 2021-04-02 21:55:58 +0000

    Fix fsck_ffs -R finds unfixed duplicate block errors when rerunning.
    
    (cherry picked from commit 7848b25edd2a513f115de6d91f0a5a8d8fa1aa58)
---
 sbin/fsck_ffs/inode.c | 3 +++
 1 file changed, 3 insertions(+)

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));
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to