Stop forcing preallocation on block imports (#2921)

Due to what seemed like a bug in qemu-img, we started forcing preallocation on block imports as an arbitrary way to skip the error.

After several updates in qemu and related dependencies, the bug is no longer reproducible.

This commit reverts this behavior and enables deactivating preallocation on block imports.

Signed-off-by: Alvaro Romero <alromero@redhat.com>
Co-authored-by: Alvaro Romero <alromero@redhat.com>
This commit is contained in:
kubevirt-bot 2023-10-10 00:52:51 +02:00 committed by GitHub
parent 2ea79c02d4
commit ebc5d92561
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,8 +112,6 @@ func main() {
volumeMode := v1.PersistentVolumeBlock
if _, err := os.Stat(common.WriteBlockPath); os.IsNotExist(err) {
volumeMode = v1.PersistentVolumeFilesystem
} else {
preallocation = true
}
// With writeback cache mode it's possible that the process will exit before all writes have been commited to storage.