]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: block: Rename qemuBlockStorageSourceGetBlockdevProps
authorPeter Krempa <pkrempa@redhat.com>
Tue, 12 Sep 2023 14:43:53 +0000 (16:43 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 17 Oct 2023 12:16:15 +0000 (14:16 +0200)
Use qemuBlockStorageSourceGetFormatProps as it formats the properties of
the 'format' driver in qemu. Adjust the comment which was hinting
otherwise.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_block.c
src/qemu/qemu_block.h
tests/qemublocktest.c

index 9b6d901e8c3ad6712e20ca2ad90b121ee038c1eb..07bc8ede76e9730f96319c3b84dfb732dc119855 100644 (file)
@@ -1295,18 +1295,17 @@ qemuBlockStorageSourceGetBlockdevFormatProps(virStorageSource *src)
 
 
 /**
- * qemuBlockStorageSourceGetBlockdevProps:
+ * qemuBlockStorageSourceGetFormatProps:
  *
  * @src: storage source to format
  * @backingStore: a storage source to use as backing of @src
  *
- * Formats @src into a JSON object which can be used with blockdev-add or
- * -blockdev. The formatted object contains both the storage and format layer
- * in nested form including link to the backing chain layer if necessary.
+ * Formats properties of @src related to the format blockdev driver in qemu
+ * into a JSON object which can be used with blockdev-add or -blockdev.
  */
 virJSONValue *
-qemuBlockStorageSourceGetBlockdevProps(virStorageSource *src,
-                                       virStorageSource *backingStore)
+qemuBlockStorageSourceGetFormatProps(virStorageSource *src,
+                                     virStorageSource *backingStore)
 {
     g_autoptr(virJSONValue) props = NULL;
     const char *backingFormatterStr = NULL;
@@ -1434,8 +1433,7 @@ qemuBlockStorageSourceAttachPrepareBlockdev(virStorageSource *src,
 
     data = g_new0(qemuBlockStorageSourceAttachData, 1);
 
-    if (!(data->formatProps = qemuBlockStorageSourceGetBlockdevProps(src,
-                                                                     backingStore)) ||
+    if (!(data->formatProps = qemuBlockStorageSourceGetFormatProps(src, backingStore)) ||
         !(data->storageProps = qemuBlockStorageSourceGetBackendProps(src,
                                                                      backendpropsflags)))
         return NULL;
@@ -3049,7 +3047,7 @@ qemuBlockReopenFormatMon(qemuMonitor *mon,
     g_autoptr(virJSONValue) srcprops = NULL;
     g_autoptr(virJSONValue) reopenoptions = virJSONValueNewArray();
 
-    if (!(srcprops = qemuBlockStorageSourceGetBlockdevProps(src, src->backingStore)))
+    if (!(srcprops = qemuBlockStorageSourceGetFormatProps(src, src->backingStore)))
         return -1;
 
     if (virJSONValueArrayAppend(reopenoptions, &srcprops) < 0)
index 530d88d28e1e3ae4107d84a1c475b3f59a09ce2c..cf5eaf87f3fadad88d2fa194e40ebd7aa3933c09 100644 (file)
@@ -57,8 +57,8 @@ virURI *
 qemuBlockStorageSourceGetURI(virStorageSource *src);
 
 virJSONValue *
-qemuBlockStorageSourceGetBlockdevProps(virStorageSource *src,
-                                       virStorageSource *backingStore);
+qemuBlockStorageSourceGetFormatProps(virStorageSource *src,
+                                     virStorageSource *backingStore);
 
 virJSONValue *
 qemuBlockStorageGetCopyOnReadProps(virDomainDiskDef *disk);
index 8bad69e7ac86d77f81b96f0a04ed1f565f801b36..edfe7719c8e1d546b1ad4d97f4fbea2b70540e84 100644 (file)
@@ -301,7 +301,7 @@ testQemuDiskXMLToProps(const void *opaque)
 
         qemuDomainPrepareDiskSourceData(disk, n);
 
-        if (!(formatProps = qemuBlockStorageSourceGetBlockdevProps(n, n->backingStore)) ||
+        if (!(formatProps = qemuBlockStorageSourceGetFormatProps(n, n->backingStore)) ||
             !(storageSrcOnlyProps = qemuBlockStorageSourceGetBackendProps(n, backendpropsflagstarget)) ||
             !(storageProps = qemuBlockStorageSourceGetBackendProps(n, backendpropsflagsnormal)) ||
             !(backingstore = qemuBlockGetBackingStoreString(n, true))) {