Merge remote-tracking branch 'origin/4.19'

This commit is contained in:
Rohit Yadav 2024-10-17 14:53:26 +05:30
commit 20901c7443
3 changed files with 15 additions and 0 deletions

View File

@ -3152,6 +3152,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);
@ -3498,6 +3501,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);

View File

@ -1447,6 +1447,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) {

View File

@ -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