(ignore the discard request).
<span class='since'>Since 1.0.6 (QEMU and KVM only)</span>
</li>
+ <li>
+ The optional <code>iothread</code> attribute assigns the
+ disk to an IOThread as defined by the range for the domain
+ <a href="#elementsIOThreadsAllocation"><code>iothreads</code></a>
+ value. Multiple devices may be assigned to the same IOThread and
+ are numbered from 1 to the domain iothreads value.
+ <span class='since'>Since 1.2.8 (QEMU only)</span>
+ </li>
</ul>
</dd>
<dt><code>boot</code></dt>
char *ioeventfd = NULL;
char *event_idx = NULL;
char *copy_on_read = NULL;
+ char *driverIOThread = NULL;
char *devaddr = NULL;
virStorageEncryptionPtr encryption = NULL;
char *serial = NULL;
event_idx = virXMLPropString(cur, "event_idx");
copy_on_read = virXMLPropString(cur, "copy_on_read");
discard = virXMLPropString(cur, "discard");
+ driverIOThread = virXMLPropString(cur, "iothread");
} else if (!def->mirror &&
xmlStrEqual(cur->name, BAD_CAST "mirror") &&
!(flags & VIR_DOMAIN_XML_INACTIVE)) {
}
}
+ if (driverIOThread) {
+ if (virStrToLong_uip(driverIOThread, NULL, 10, &def->iothread) < 0) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("Invalid iothread attribute in disk driver "
+ "element: %s"), driverIOThread);
+ goto error;
+ }
+ }
+
if (devaddr) {
if (virDomainParseLegacyDeviceAddress(devaddr,
&def->info.addr.pci) < 0) {
VIR_FREE(event_idx);
VIR_FREE(copy_on_read);
VIR_FREE(discard);
+ VIR_FREE(driverIOThread);
VIR_FREE(devaddr);
VIR_FREE(serial);
virStorageEncryptionFree(encryption);
if (def->src->driverName || def->src->format > 0 || def->cachemode ||
def->error_policy || def->rerror_policy || def->iomode ||
def->ioeventfd || def->event_idx || def->copy_on_read ||
- def->discard) {
+ def->discard || def->iothread) {
virBufferAddLit(buf, "<driver");
if (def->src->driverName)
virBufferAsprintf(buf, " name='%s'", def->src->driverName);
virBufferAsprintf(buf, " copy_on_read='%s'", copy_on_read);
if (def->discard)
virBufferAsprintf(buf, " discard='%s'", discard);
+ if (def->iothread)
+ virBufferAsprintf(buf, " iothread='%u'", def->iothread);
virBufferAddLit(buf, "/>\n");
}