In vmware linux, the iscsi device contains more than one SCSI ID, and, the second one's data length is zero. blkmapd must skip it, otherwise, some device will be treat as the above one. Signed-off-by: Kinglong Mee <kinglongmee@xxxxxxxxx> --- utils/blkmapd/device-inq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/blkmapd/device-inq.c b/utils/blkmapd/device-inq.c index 6b56b67..57fe7a3 100644 --- a/utils/blkmapd/device-inq.c +++ b/utils/blkmapd/device-inq.c @@ -198,7 +198,7 @@ struct bl_serial *bldev_read_serial(int fd, const char *filename) dev_id = (struct bl_dev_id *)&(dev_root->data[pos]); pos += (dev_id->len + devid_len); - if ((dev_id->ids & 0xf) < current_id) + if ((dev_id->ids & 0xf) < current_id || !dev_id->len) continue; switch (dev_id->ids & 0xf) { /* We process SCSI ID with four ID cases: 0, 1, 2 and 3. -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html