qemu: caps: Add capability for 'share-rw' disk option

'share-rw' for the disk device configures qemu to allow concurrent
access to the backing storage.

The capability is checked in various supported disk frontend buses since
it does not make sense to partially backport it.
This commit is contained in:
Peter Krempa 2017-11-15 15:02:58 +01:00
parent 2b41c86294
commit 860a3c4bea
10 changed files with 14 additions and 0 deletions

View File

@ -450,6 +450,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
/* 275 */
"sclplmconsole",
"numa.dist",
"disk-share-rw",
);
@ -1694,6 +1695,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBlk[] = {
{ "scsi", QEMU_CAPS_VIRTIO_BLK_SCSI },
{ "logical_block_size", QEMU_CAPS_BLOCKIO },
{ "num-queues", QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES },
{ "share-rw", QEMU_CAPS_DISK_SHARE_RW },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioNet[] = {
@ -1724,10 +1726,12 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVfioPCI[] = {
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsSCSIDisk[] = {
{ "channel", QEMU_CAPS_SCSI_DISK_CHANNEL },
{ "wwn", QEMU_CAPS_SCSI_DISK_WWN },
{ "share-rw", QEMU_CAPS_DISK_SHARE_RW },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsIDEDrive[] = {
{ "wwn", QEMU_CAPS_IDE_DRIVE_WWN },
{ "share-rw", QEMU_CAPS_DISK_SHARE_RW },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsPiix4PM[] = {
@ -1758,6 +1762,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsQ35PCIHost[] = {
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsUSBStorage[] = {
{ "removable", QEMU_CAPS_USB_STORAGE_REMOVABLE },
{ "share-rw", QEMU_CAPS_DISK_SHARE_RW },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsKVMPit[] = {

View File

@ -436,6 +436,7 @@ typedef enum {
/* 275 */
QEMU_CAPS_DEVICE_SCLPLMCONSOLE, /* -device sclplmconsole */
QEMU_CAPS_NUMA_DIST, /* -numa dist */
QEMU_CAPS_DISK_SHARE_RW, /* share-rw=on for concurrent disk access */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;

View File

@ -181,6 +181,7 @@
<flag name='vxhs'/>
<flag name='virtio-blk.num-queues'/>
<flag name='numa.dist'/>
<flag name='disk-share-rw'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.10.0)</package>

View File

@ -181,6 +181,7 @@
<flag name='vxhs'/>
<flag name='virtio-blk.num-queues'/>
<flag name='numa.dist'/>
<flag name='disk-share-rw'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.10.0)</package>

View File

@ -180,6 +180,7 @@
<flag name='machine.pseries.resize-hpt'/>
<flag name='spapr-vty'/>
<flag name='numa.dist'/>
<flag name='disk-share-rw'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.10.0)</package>

View File

@ -143,6 +143,7 @@
<flag name='virtio-blk.num-queues'/>
<flag name='sclplmconsole'/>
<flag name='numa.dist'/>
<flag name='disk-share-rw'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -225,6 +225,7 @@
<flag name='vxhs'/>
<flag name='virtio-blk.num-queues'/>
<flag name='numa.dist'/>
<flag name='disk-share-rw'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.10.0)</package>

View File

@ -174,6 +174,7 @@
<flag name='virtio-gpu.max_outputs'/>
<flag name='virtio-blk.num-queues'/>
<flag name='spapr-vty'/>
<flag name='disk-share-rw'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.9.0)</package>

View File

@ -139,6 +139,7 @@
<flag name='virtio-gpu.max_outputs'/>
<flag name='virtio-blk.num-queues'/>
<flag name='sclplmconsole'/>
<flag name='disk-share-rw'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -221,6 +221,7 @@
<flag name='chardev-reconnect'/>
<flag name='virtio-gpu.max_outputs'/>
<flag name='virtio-blk.num-queues'/>
<flag name='disk-share-rw'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.9.0)</package>