On 04/03/2013 04:29 PM, Osier Yang wrote:
On 01/04/13 20:00, Han Cheng wrote:
@@ -10773,6 +10911,16 @@ virDomainDefParseXML(virCapsPtr caps,
goto error;
}
+ if (hostdev->source.subsys.type ==
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI &&
+ hostdev->info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
+ /* reverse first 16 unit for disk usage */

s/reverse/reserve/

+ hostdev->info->type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE;
+ hostdev->info->addr.drive.controller = 0;
+ hostdev->info->addr.drive.bus = 0;
+ hostdev->info->addr.drive.target = 0;

Why this defdaults to 0? Can you explain it either in the commit log or
by comments?

OK.
/* We define default mapping to be 1 controller, 1 bus, 1 target and many units. */

+ hostdev->info->addr.drive.unit = 16 + i;

And why the "16".

In virDomainDiskDefAssignAddress, we assgined first 16 unit for scsi disk. We reserve these address to avoid conflict.

+ }
+
def->hostdevs[def->nhostdevs++] = hostdev;
}
VIR_FREE(nodes);

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to