The problem is that ata_id_n_sectors() function:
static u64 ata_id_n_sectors(const u16 *id)
{
if (ata_id_has_lba(id)) {
if (ata_id_has_lba48(id))
return ata_id_u64(id, 100);
else
return ata_id_u32(id, 60);
} else {
if (ata_id_current_chs_valid(id))
return ata_id_u32(id, 57);
else
return id[1] * id[3] * id[6];
}
}
fails to retrieve the LBA48 value.
This is because the ata_id_has_lba() test
#define ata_id_has_lba(id) ((id)[49] & (1 << 9))
fails as the identify data contains only zeros at word 49 (byte 0x62).
Another problem is that ata_id_has_lba48() would fail too - that will break
array over 2TB (if the controller BIOS and firmware can do it).
Looks like this needs to force LBA48 with these virtual drives.
--
Ondrej Zary
--