mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
linstor: enable discard for Linstor storage pools (#9770)
* linstor: enable discard for Linstor storage pools All Linstor storage backends support discard, so it can be safely enabled. * linstor: enable discard for Linstor storage pools CHANGELOG.md
This commit is contained in:
parent
44597724f5
commit
7fbd0a9fb4
@ -3128,6 +3128,9 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
||||
else {
|
||||
disk.defBlockBasedDisk(physicalDisk.getPath(), devId, diskBusType);
|
||||
}
|
||||
if (pool.getType() == StoragePoolType.Linstor) {
|
||||
disk.setDiscard(DiscardType.UNMAP);
|
||||
}
|
||||
} else {
|
||||
if (volume.getType() == Volume.Type.DATADISK && !(isWindowsTemplate && isUefiEnabled)) {
|
||||
disk.defFileBasedDisk(physicalDisk.getPath(), devId, diskBusTypeData, DiskDef.DiskFmtType.QCOW2);
|
||||
@ -3474,6 +3477,9 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
||||
diskdef.defFileBasedDisk(attachingDisk.getPath(), devId, busT, DiskDef.DiskFmtType.QCOW2);
|
||||
} else if (attachingDisk.getFormat() == PhysicalDiskFormat.RAW) {
|
||||
diskdef.defBlockBasedDisk(attachingDisk.getPath(), devId, busT);
|
||||
if (attachingPool.getType() == StoragePoolType.Linstor) {
|
||||
diskdef.setDiscard(DiscardType.UNMAP);
|
||||
}
|
||||
}
|
||||
if (bytesReadRate != null && bytesReadRate > 0) {
|
||||
diskdef.setBytesReadRate(bytesReadRate);
|
||||
|
||||
@ -1444,6 +1444,9 @@ public class KVMStorageProcessor implements StorageProcessor {
|
||||
diskdef.defFileBasedDisk(attachingDisk.getPath(), devId, busT, DiskDef.DiskFmtType.QCOW2);
|
||||
} else if (attachingDisk.getFormat() == PhysicalDiskFormat.RAW) {
|
||||
diskdef.defBlockBasedDisk(attachingDisk.getPath(), devId, busT);
|
||||
if (attachingPool.getType() == StoragePoolType.Linstor) {
|
||||
diskdef.setDiscard(DiscardType.UNMAP);
|
||||
}
|
||||
}
|
||||
|
||||
if (encryptDetails != null) {
|
||||
|
||||
@ -5,6 +5,12 @@ All notable changes to Linstor CloudStack plugin will be documented in this file
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2024-10-04]
|
||||
|
||||
### Added
|
||||
|
||||
- Enable qemu discard="unmap" for Linstor block disks
|
||||
|
||||
## [2024-08-27]
|
||||
|
||||
### Changed
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user