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 {
|
else {
|
||||||
disk.defBlockBasedDisk(physicalDisk.getPath(), devId, diskBusType);
|
disk.defBlockBasedDisk(physicalDisk.getPath(), devId, diskBusType);
|
||||||
}
|
}
|
||||||
|
if (pool.getType() == StoragePoolType.Linstor) {
|
||||||
|
disk.setDiscard(DiscardType.UNMAP);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (volume.getType() == Volume.Type.DATADISK && !(isWindowsTemplate && isUefiEnabled)) {
|
if (volume.getType() == Volume.Type.DATADISK && !(isWindowsTemplate && isUefiEnabled)) {
|
||||||
disk.defFileBasedDisk(physicalDisk.getPath(), devId, diskBusTypeData, DiskDef.DiskFmtType.QCOW2);
|
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);
|
diskdef.defFileBasedDisk(attachingDisk.getPath(), devId, busT, DiskDef.DiskFmtType.QCOW2);
|
||||||
} else if (attachingDisk.getFormat() == PhysicalDiskFormat.RAW) {
|
} else if (attachingDisk.getFormat() == PhysicalDiskFormat.RAW) {
|
||||||
diskdef.defBlockBasedDisk(attachingDisk.getPath(), devId, busT);
|
diskdef.defBlockBasedDisk(attachingDisk.getPath(), devId, busT);
|
||||||
|
if (attachingPool.getType() == StoragePoolType.Linstor) {
|
||||||
|
diskdef.setDiscard(DiscardType.UNMAP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (bytesReadRate != null && bytesReadRate > 0) {
|
if (bytesReadRate != null && bytesReadRate > 0) {
|
||||||
diskdef.setBytesReadRate(bytesReadRate);
|
diskdef.setBytesReadRate(bytesReadRate);
|
||||||
|
|||||||
@ -1444,6 +1444,9 @@ public class KVMStorageProcessor implements StorageProcessor {
|
|||||||
diskdef.defFileBasedDisk(attachingDisk.getPath(), devId, busT, DiskDef.DiskFmtType.QCOW2);
|
diskdef.defFileBasedDisk(attachingDisk.getPath(), devId, busT, DiskDef.DiskFmtType.QCOW2);
|
||||||
} else if (attachingDisk.getFormat() == PhysicalDiskFormat.RAW) {
|
} else if (attachingDisk.getFormat() == PhysicalDiskFormat.RAW) {
|
||||||
diskdef.defBlockBasedDisk(attachingDisk.getPath(), devId, busT);
|
diskdef.defBlockBasedDisk(attachingDisk.getPath(), devId, busT);
|
||||||
|
if (attachingPool.getType() == StoragePoolType.Linstor) {
|
||||||
|
diskdef.setDiscard(DiscardType.UNMAP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (encryptDetails != null) {
|
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/),
|
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).
|
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]
|
## [2024-08-27]
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user