Re: [PATCH v2 03/10] conf: Introduce scsi hostdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]