mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-02 09:47:16 +03:00
storage: Use qcow2 lazy_refcounts if supported
This commit is contained in:
parent
1ab206a3eb
commit
cac593da8f
@ -9,5 +9,8 @@
|
||||
<owner>10736</owner>
|
||||
<group>10736</group>
|
||||
</permissions>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
</volume>
|
||||
|
@ -13,5 +13,9 @@
|
||||
<owner>10736</owner>
|
||||
<group>10736</group>
|
||||
</permissions>
|
||||
<compat>1.1</compat>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
</volume>
|
||||
|
@ -9,5 +9,8 @@
|
||||
<owner>10736</owner>
|
||||
<group>10736</group>
|
||||
</permissions>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
</volume>
|
||||
|
@ -8,5 +8,8 @@
|
||||
<owner>10736</owner>
|
||||
<group>10736</group>
|
||||
</permissions>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
</volume>
|
||||
|
@ -9,5 +9,8 @@
|
||||
<owner>10736</owner>
|
||||
<group>10736</group>
|
||||
</permissions>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
</volume>
|
||||
|
@ -9,5 +9,8 @@
|
||||
<owner>10736</owner>
|
||||
<group>10736</group>
|
||||
</permissions>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
</volume>
|
||||
|
@ -13,5 +13,9 @@
|
||||
<owner>10736</owner>
|
||||
<group>10736</group>
|
||||
</permissions>
|
||||
<compat>1.1</compat>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
</volume>
|
||||
|
@ -9,5 +9,8 @@
|
||||
<owner>10736</owner>
|
||||
<group>10736</group>
|
||||
</permissions>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
</volume>
|
||||
|
@ -8,5 +8,8 @@
|
||||
<owner>10736</owner>
|
||||
<group>10736</group>
|
||||
</permissions>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
</volume>
|
||||
|
@ -8,5 +8,8 @@
|
||||
<owner>10736</owner>
|
||||
<group>10736</group>
|
||||
</permissions>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
</volume>
|
||||
|
@ -9,5 +9,8 @@
|
||||
<owner>10736</owner>
|
||||
<group>10736</group>
|
||||
</permissions>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
</volume>
|
||||
|
@ -13,5 +13,9 @@
|
||||
<owner>10736</owner>
|
||||
<group>10736</group>
|
||||
</permissions>
|
||||
<compat>1.1</compat>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
</volume>
|
||||
|
@ -9,5 +9,8 @@
|
||||
<owner>10736</owner>
|
||||
<group>10736</group>
|
||||
</permissions>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
</volume>
|
||||
|
@ -11,6 +11,9 @@
|
||||
<label>foo.label</label>
|
||||
</permissions>
|
||||
<path>/foo/bar</path>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
<backingStore>
|
||||
<path>/my/backing</path>
|
||||
|
@ -1047,6 +1047,7 @@ class XMLParseTest(unittest.TestCase):
|
||||
check("format", "raw", "qcow2")
|
||||
check("target_path", None, "/foo/bar")
|
||||
check("backing_store", "/foo/bar/baz", "/my/backing")
|
||||
check("lazy_refcounts", False, True)
|
||||
|
||||
check = self._make_checker(vol.permissions)
|
||||
check("mode", "0700", "0744")
|
||||
|
@ -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 #
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user