From 7af854ac9a9d806dc74148534687010fd0057d11 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 8 Apr 2023 03:56:48 +0200 Subject: [PATCH] Use discard to unmap blocks --- disk.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/disk.sh b/disk.sh index aa8db80..bc5cd42 100644 --- a/disk.sh +++ b/disk.sh @@ -22,11 +22,11 @@ fi KVM_DISK_OPTS="\ -device virtio-scsi-pci,id=hw-synoboot,bus=pcie.0,addr=0xa \ - -drive file=${IMG}/${BASE}.boot.img,if=none,id=drive-synoboot,format=raw,cache=none,aio=native,detect-zeroes=on \ + -drive file=${IMG}/${BASE}.boot.img,if=none,id=drive-synoboot,format=raw,cache=none,aio=native,discard=on,detect-zeroes=on \ -device scsi-hd,bus=hw-synoboot.0,channel=0,scsi-id=0,lun=0,drive=drive-synoboot,id=synoboot0,rotation_rate=1,bootindex=1 \ -device virtio-scsi-pci,id=hw-synosys,bus=pcie.0,addr=0xb \ - -drive file=${IMG}/${BASE}.system.img,if=none,id=drive-synosys,format=raw,cache=none,aio=native,detect-zeroes=on \ + -drive file=${IMG}/${BASE}.system.img,if=none,id=drive-synosys,format=raw,cache=none,aio=native,discard=on,detect-zeroes=on \ -device scsi-hd,bus=hw-synosys.0,channel=0,scsi-id=0,lun=0,drive=drive-synosys,id=synosys0,rotation_rate=1,bootindex=2 \ -device virtio-scsi-pci,id=hw-userdata,bus=pcie.0,addr=0xc \ - -drive file=${IMG}/data${DISK_SIZE}.img,if=none,id=drive-userdata,format=raw,cache=none,aio=native,detect-zeroes=on \ + -drive file=${IMG}/data${DISK_SIZE}.img,if=none,id=drive-userdata,format=raw,cache=none,aio=native,discard=on,detect-zeroes=on \ -device scsi-hd,bus=hw-userdata.0,channel=0,scsi-id=0,lun=0,drive=drive-userdata,id=userdata0,rotation_rate=1,bootindex=3"