mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu: block: Remove unused flags QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_ flags
QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_SKIP_UNMAP is no longer referenced inside the code. QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY is passed from various code paths to the qemuBlockStorageSourceGetBackendProps helper, but it's no longer used. Both thus can be removed. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
620ef445ce
commit
47ee78048c
@ -1007,11 +1007,6 @@ qemuBlockStorageSourceAddBlockdevCommonProps(virJSONValue **props,
|
|||||||
* use legacy formatting of attributes (for -drive / old qemus)
|
* use legacy formatting of attributes (for -drive / old qemus)
|
||||||
* QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY:
|
* QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY:
|
||||||
* omit any data which does not identify the image itself
|
* omit any data which does not identify the image itself
|
||||||
* QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY:
|
|
||||||
* use the auto-read-only feature of qemu
|
|
||||||
* QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_SKIP_UNMAP:
|
|
||||||
* don't enable 'discard:unmap' option for passing through discards
|
|
||||||
* (note that this is disabled also for _LEGACY and _TARGET_ONLY options)
|
|
||||||
* QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_EFFECTIVE_NODE:
|
* QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_EFFECTIVE_NODE:
|
||||||
* the 'protocol' node is used as the effective/top node of a virStorageSource
|
* the 'protocol' node is used as the effective/top node of a virStorageSource
|
||||||
*
|
*
|
||||||
@ -1511,7 +1506,7 @@ qemuBlockStorageSourceAttachPrepareBlockdev(virStorageSource *src,
|
|||||||
virStorageSource *backingStore)
|
virStorageSource *backingStore)
|
||||||
{
|
{
|
||||||
g_autoptr(qemuBlockStorageSourceAttachData) data = NULL;
|
g_autoptr(qemuBlockStorageSourceAttachData) data = NULL;
|
||||||
unsigned int backendpropsflags = QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY;
|
unsigned int backendpropsflags = 0;
|
||||||
|
|
||||||
data = g_new0(qemuBlockStorageSourceAttachData, 1);
|
data = g_new0(qemuBlockStorageSourceAttachData, 1);
|
||||||
|
|
||||||
|
@ -66,9 +66,7 @@ qemuBlockStorageSourceSupportsConcurrentAccess(virStorageSource *src);
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_LEGACY = 1 << 0,
|
QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_LEGACY = 1 << 0,
|
||||||
QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY = 1 << 1,
|
QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY = 1 << 1,
|
||||||
QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY = 1 << 2,
|
QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_EFFECTIVE_NODE = 1 << 2,
|
||||||
QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_SKIP_UNMAP = 1 << 3,
|
|
||||||
QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_EFFECTIVE_NODE = 1 << 4,
|
|
||||||
} qemuBlockStorageSourceBackendPropsFlags;
|
} qemuBlockStorageSourceBackendPropsFlags;
|
||||||
|
|
||||||
virJSONValue *
|
virJSONValue *
|
||||||
|
@ -285,9 +285,6 @@ testQemuDiskXMLToProps(const void *opaque)
|
|||||||
|
|
||||||
for (n = disk->src; virStorageSourceIsBacking(n); n = n->backingStore) {
|
for (n = disk->src; virStorageSourceIsBacking(n); n = n->backingStore) {
|
||||||
g_autofree char *backingstore = NULL;
|
g_autofree char *backingstore = NULL;
|
||||||
unsigned int backendpropsflagsnormal = QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY;
|
|
||||||
unsigned int backendpropsflagstarget = QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY |
|
|
||||||
QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY;
|
|
||||||
|
|
||||||
if (testQemuDiskXMLToJSONFakeSecrets(n) < 0)
|
if (testQemuDiskXMLToJSONFakeSecrets(n) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -298,8 +295,8 @@ testQemuDiskXMLToProps(const void *opaque)
|
|||||||
qemuDomainPrepareDiskSourceData(disk, n);
|
qemuDomainPrepareDiskSourceData(disk, n);
|
||||||
|
|
||||||
if (!(formatProps = qemuBlockStorageSourceGetFormatProps(n, n->backingStore)) ||
|
if (!(formatProps = qemuBlockStorageSourceGetFormatProps(n, n->backingStore)) ||
|
||||||
!(storageSrcOnlyProps = qemuBlockStorageSourceGetBackendProps(n, backendpropsflagstarget)) ||
|
!(storageSrcOnlyProps = qemuBlockStorageSourceGetBackendProps(n, QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY)) ||
|
||||||
!(storageProps = qemuBlockStorageSourceGetBackendProps(n, backendpropsflagsnormal)) ||
|
!(storageProps = qemuBlockStorageSourceGetBackendProps(n, 0)) ||
|
||||||
!(backingstore = qemuBlockGetBackingStoreString(n, true))) {
|
!(backingstore = qemuBlockGetBackingStoreString(n, true))) {
|
||||||
if (!data->fail) {
|
if (!data->fail) {
|
||||||
VIR_TEST_VERBOSE("failed to generate qemu blockdev props");
|
VIR_TEST_VERBOSE("failed to generate qemu blockdev props");
|
||||||
|
Loading…
Reference in New Issue
Block a user