aboutsummaryrefslogtreecommitdiff
path: root/kvmx
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2022-01-08 16:18:57 -0300
committerSilvio Rhatto <rhatto@riseup.net>2022-01-08 16:18:57 -0300
commit48977cf4c193acbc2e57f2c6a34269faf4723b75 (patch)
tree7fcb0597af10f756f12a9eac4a7c342452da792d /kvmx
parente1a1bd36c6df22ae9c2af75cf07cbd940e824733 (diff)
downloadkvmx-48977cf4c193acbc2e57f2c6a34269faf4723b75.tar.gz
kvmx-48977cf4c193acbc2e57f2c6a34269faf4723b75.tar.bz2
Feat: TRIM support using image_discards option
Diffstat (limited to 'kvmx')
-rwxr-xr-xkvmx5
1 files changed, 5 insertions, 0 deletions
diff --git a/kvmx b/kvmx
index a486271..42252dd 100755
--- a/kvmx
+++ b/kvmx
@@ -547,6 +547,11 @@ function kvmx_up {
image_opts="-cdrom $image"
else
image_opts="-drive file=$image,if=$drive_interface"
+
+ # TRIM support
+ if [ "$image_discards" != "n" ]; then
+ image_opts="$image_opts,discard=unmap"
+ fi
fi
if [ ! -z "$virtio_rng" ]; then