oz/SOURCES/0006-Use-discard-unmap-for-images.patch

28 lines
1.1 KiB
Diff

From 7ae8898e4a0264b8eb6ea7b89d3269bf16bc5dce Mon Sep 17 00:00:00 2001
From: Tomas Kopecek <tkopecek@redhat.com>
Date: Mon, 22 Aug 2022 17:50:57 +0200
Subject: [PATCH 06/21] Use discard=unmap for images
Related: https://github.com/clalancette/oz/issues/302
Related: https://pagure.io/koji/issue/3473
---
oz/Guest.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/oz/Guest.py b/oz/Guest.py
index ae954b8..f1ca403 100644
--- a/oz/Guest.py
+++ b/oz/Guest.py
@@ -553,7 +553,7 @@ class Guest(object):
bootDisk = oz.ozutil.lxml_subelement(devices, "disk", None, {'device': 'disk', 'type': 'file'})
oz.ozutil.lxml_subelement(bootDisk, "target", None, {'dev': self.disk_dev, 'bus': self.disk_bus})
oz.ozutil.lxml_subelement(bootDisk, "source", None, {'file': self.diskimage})
- oz.ozutil.lxml_subelement(bootDisk, "driver", None, {'name': 'qemu', 'type': self.image_type})
+ oz.ozutil.lxml_subelement(bootDisk, "driver", None, {'name': 'qemu', 'type': self.image_type, 'discard': 'unmap'})
# install disk (if any)
if not installdev:
installdev_list = []
--
2.43.0