Subject: bin/28559: fsck_ext2fs disagrees with Linux (fc2) fsck
To: None <,>
From: Kevin Lahey <>
List: netbsd-bugs
Date: 12/05/2004 23:27:00
>Number:         28559
>Category:       bin
>Synopsis:       fsck_ext2fs disagrees with Linux (fc2) fsck
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 05 23:27:00 +0000 2004
>Originator:     Kevin Lahey
>Release:        NetBSD 2.99.10
System: NetBSD yakko 2.99.10 NetBSD 2.99.10 (YAKKO) #0: Thu Dec 2 18:28:49 PST 2004 kml@yakko:/sys/arch/i386/compile/YAKKO i386
Architecture: i386
Machine: i386
        When fsck_ext2fs runs against my ext2fs partition, it flags a number
        of "INCORRECT BLOCK COUNT:  inode xxxxx:  (16 should be 8)"
        problems.  Strangely enough, when I reboot into Linux and force it
        to recheck the filesystem, Linux in turn flags each of these
        inodes as "(8 should be 16)".

        This is on a 15GB filesystem created and used with Fedora Core 2
        with up to date patches as of a couple of days ago.  As you can
        see, the NetBSD kernel on this system is pretty up to date,
        and the userland is less than a month old.

        I can provide more filesytem information on request, but it
        isn't clear to me that it is germaine.  While this problem is
        annoying, neither NetBSD nor Linux seem to have any ongoing
        problems with the filesystem after it has been cleaned.
        Unexpectedly power off your NetBSD system.  Watch it complain
        on fsck'ing the ext2 partition.  Reboot into Linux, forcing
        it to fsck the partition.  (I found that tune2fs -c 1 was useful
        for forcing checks.)  Notice that Linux complains about the same
        inodes as NetBSD. 

        I would expect (but have not checked) that this would show up
        with a simple fsck on the ext2 filesystem, without needing to
        screw it up by crashing the system.
        I'm thinking that we need to tweak fsck_ext2fs, but that might
        be easier said than done.