In order to be able to propagate image configuration to newly formatted
images we need to be able to query it.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_monitor.h | 3 +++
src/qemu/qemu_monitor_json.c | 10 +++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 29746f0b8e..850e01f026 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -784,6 +784,9 @@ struct _qemuBlockNamedNodeData {
/* image version */
bool qcow2v2;
+
+ /* qcow2 subcluster allocation -> extended_l2 */
+ bool qcow2extendedL2;
};
GHashTable *
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index a3d6eca569..6eedc925c4 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -2806,9 +2806,13 @@ qemuMonitorJSONBlockGetNamedNodeDataWorker(size_t pos
G_GNUC_UNUSED,
STREQ_NULLABLE(virJSONValueObjectGetString(format_specific, "type"),
"qcow2")) {
virJSONValue *qcow2props = virJSONValueObjectGetObject(format_specific,
"data");
- if (qcow2props &&
- STREQ_NULLABLE(virJSONValueObjectGetString(qcow2props, "compat"),
"0.10"))
- ent->qcow2v2 = true;
+ if (qcow2props) {
+ if (STREQ_NULLABLE(virJSONValueObjectGetString(qcow2props,
"compat"), "0.10"))
+ ent->qcow2v2 = true;
+
+ ignore_value(virJSONValueObjectGetBoolean(qcow2props,
"extended-l2",
+ &ent->qcow2extendedL2));
+ }
}
if (virHashAddEntry(nodes, nodename, ent) < 0)
--
2.31.1