Whamcloud - gitweb
Fix blkid library so that the cache validation notices ext2 to ext3 conversion
authorKarel Zak <kzak@redhat.com>
Tue, 6 Sep 2005 10:26:45 +0000 (06:26 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 6 Sep 2005 10:26:45 +0000 (06:26 -0400)
commit05a6edf4fdf3beb93d22116cf4ec39d161ab2790
tree58b16ed2ecb754f20dcf15c45ad0e0488ce06086
parent68a7f959c0af3d6e32cf9339433667f04b8a1c56
Fix blkid library so that the cache validation notices ext2 to ext3 conversion

There's mistake in blkid ext2 detection code. The libblkid doesn't
check for journal when revalidate the cache information about an ext2
device.

        # rm -f /etc/blkid.tab

        # mkfs.ext2 /dev/loop0 &> /dev/null
        # blkid -s TYPE /dev/loop0
        /dev/loop0: TYPE="ext2"

        # mkfs.ext3 /dev/loop0 &> /dev/null
        # blkid -s TYPE /dev/loop0
        /dev/loop0: TYPE="ext2"

That bug doesn't appear when libblkid creates new cache and checks for
all possible filesystems, because it tries ext3 before ext2. BUT when
the library only revalidate the cache it first probes for old cached
filesystem (e.g. ext2).

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/blkid/ChangeLog
lib/blkid/probe.c