It seems that the current minix probing code is not robust enough and
it returns false positive for Fedora f24 install images. The crazy thing
is that the image pass also all Linux kernel minix_fill_super() checks
and mount(2) fails later when it tries to read filesystem root
directory.
The fsck.minix requires sb->s_log_zone_size to be zero (Linux kernel
does not care about it), let's use the same requirement for libblkid.
Note, it would be possible to check minix root directory inode in
libblkid, but this solution requires minix prober specific seek &
read. We want to avoid extra read operations...
References: https://bugzilla.redhat.com/show_bug.cgi?id=
1299255
Signed-off-by: Karel Zak <kzak@redhat.com>
struct minix_super_block *sb = (struct minix_super_block *) data;
int zones, ninodes, imaps, zmaps, firstz;
- if (sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0)
+ if (sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0 ||
+ sb->s_log_zone_size != 0)
return 1;
zones = version == 2 ? minix_swab32(swabme, sb->s_zones) :
return 1;
if (zmaps * MINIX_BLOCK_SIZE * 8 < zones - firstz + 1)
return 1;
-
} else if (version == 3) {
struct minix3_super_block *sb = (struct minix3_super_block *) data;