mirror of https://github.com/apache/cloudstack.git
Fixed the wrong if else statement
This commit is contained in:
parent
b6621428a9
commit
94ee16a719
|
|
@ -1199,12 +1199,7 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
|
|||
if (disk.getFormat() == PhysicalDiskFormat.TAR) {
|
||||
newDisk = destPool.createPhysicalDisk(name, PhysicalDiskFormat.DIR, Storage.ProvisioningType.THIN, disk.getVirtualSize());
|
||||
} else {
|
||||
/* If the source device is on a RBD storage pool force the new disk to the same format (RAW) */
|
||||
if (srcPool.getType() != StoragePoolType.RBD) {
|
||||
newDisk = destPool.createPhysicalDisk(name, Storage.ProvisioningType.THIN, disk.getVirtualSize());
|
||||
} else {
|
||||
newDisk = destPool.createPhysicalDisk(name, Storage.ProvisioningType.THIN, disk.getVirtualSize());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
newDisk = new KVMPhysicalDisk(destPool.getSourceDir() + "/" + name, name, destPool);
|
||||
|
|
|
|||
Loading…
Reference in New Issue