On Mon, Aug 31, 2009 at 09:53:10AM +0200, Kay Sievers wrote: > On Mon, Aug 31, 2009 at 09:21, Thomas Bächler<thomas@xxxxxxxxxxxxx> wrote: > > Theodore Tso schrieb: > >> > >> Hmm, well *that's* a change between the blkid that was in e2fsprogs > >> and the version that was in util-linux-ng. In e2fsprogs' blkid, I > >> stopped after I found the first match. As a result, the filesystems > >> that had the most sophisticated (and thus less prone to false > >> positives) were put *first*, and filesystems that had sloppy > >> mkfs/mkswap/dmcrypt-setup programs that didn't zap the first and last > >> 32k-64k of the partition to prevent false positives were placed later > >> in the detection table. > >> > >> If the new blkid library in util-linux-ng searches the whole list and > >> finds the *last* match, and it's using the same order of probes as in > >> e2fsprogs' blkid, it means there will be a significant chance in > >> behavior, and the danger is that there may be many more false > >> positives. > > > > I think you read me wrong: It's not returning the last result. When it > > finishes all the probes, it checks if there was exactly one result and > > prints that. If there was more than one result, it discards them all and > > returns no result at all. This will lead to no false positives at all, but > > lots of false negatives with LUKS volumes created with old cryptsetup > > versions. > > Right, and it's the expected behavior. > > We can not afford to return anything we are not sure about. It may > result in serious data corruption and data loss to return the wrong > type of filesystem. Therefore we don't return anything if we find We already have such experience. Somewhere in RH bugzilla are reports from people who *lost data* because LiveCD init script has called swapon for wrong partition. Karel -- Karel Zak <kzak@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html