On Wed, Apr 30, 2014 at 01:50:13PM +0200, Lukáš Czerner wrote: > > + /* > > + * We should eventually replace this with a test for the > > + * presence of a partition table. Unfortunately the blkid > > + * library doesn't test for partition tabels, and checking for > > + * valid GPT and MBR and possibly others isn't quite trivial. > > + */ > > That is not true. libblkid definitely can scan for partition or any > other signature for that matter (lvm, mdraid, ...) and we should > definitely utilize that. libblkid scan scan for LVM and mdraid, sure. But it doesn't scan for GPT or MBR partition labels: % dpkg -S /sbin/blkid util-linux: /sbin/blkid % fdisk -l /dev/sda Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xae7b6b2b Device Boot Start End Blocks Id System /dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT /dev/sda2 206848 167772159 83782656 7 HPFS/NTFS/exFAT /dev/sda3 167772160 482344959 157286400 83 Linux /dev/sda4 482344960 1953525167 735590104 8e Linux LVM % sudo /sbin/blkid /dev/sda % Ohhh... this may be debian's fault for having a pre-historic util-linux. But anyway, if util-linux does detect partition labels, then this patch will catch the problem. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html