diff options
author | Cole Robinson <crobinso@redhat.com> | 2014-02-03 14:52:23 -0500 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2014-02-03 15:55:20 -0500 |
commit | cac593da8fce27266b40aba5ea3a9784249063ab (patch) | |
tree | a9cc6f382adaad43120e31ecafd8b1dd965925e3 /virtinst | |
parent | 1ab206a3ebbb304f180ec3d0f97af659754c1834 (diff) | |
download | virt-manager-cac593da8fce27266b40aba5ea3a9784249063ab.tar.gz |
storage: Use qcow2 lazy_refcounts if supported
Diffstat (limited to 'virtinst')
-rw-r--r-- | virtinst/storage.py | 6 | ||||
-rw-r--r-- | virtinst/support.py | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/virtinst/storage.py b/virtinst/storage.py index fc4cd244..b98b9153 100644 --- a/virtinst/storage.py +++ b/virtinst/storage.py @@ -595,6 +595,12 @@ class StorageVolume(_StorageObject): target_path = XMLProperty("./target/path") backing_store = XMLProperty("./backingStore/path") + def _lazy_refcounts_default_cb(self): + return self.conn.check_support( + self.conn.SUPPORT_CONN_QCOW2_LAZY_REFCOUNTS) + lazy_refcounts = XMLProperty("./target/features/lazy_refcounts", + is_bool=True, default_cb=_lazy_refcounts_default_cb) + ###################### # Public API helpers # diff --git a/virtinst/support.py b/virtinst/support.py index 52376985..c64bf390 100644 --- a/virtinst/support.py +++ b/virtinst/support.py @@ -292,8 +292,10 @@ SUPPORT_CONN_VIRTIO_CONSOLE = _make(drv_libvirt_version=[("qemu", 8003)]) SUPPORT_CONN_PANIC_DEVICE = _make(version=1002001, drv_version=[("qemu", 1005000), ("test", 0)]) -SUPPORT_CONN_PM_DISABLE = _make(version="10002", drv_version=[ - ("qemu", 1002000), ("test", 0)]) +SUPPORT_CONN_PM_DISABLE = _make(version="10002", + drv_version=[("qemu", 1002000), ("test", 0)]) +SUPPORT_CONN_QCOW2_LAZY_REFCOUNTS = _make(version="1001000", + drv_version=[("qemu", 1002000), ("test", 0)]) # Domain checks |