mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
storage_util: Split preallocate set in storageBackendCreateQemuImgOpts
The only way preallocate could be set is if the info->format was not RAW (see storageBackendCreateQemuImgSetBacking), so let's just extract it from the if/else surrounding the application of the encryption options. Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
c46fc572be
commit
b5c8c547b7
@ -831,12 +831,13 @@ storageBackendCreateQemuImgOpts(virStorageEncryptionInfoDefPtr enc,
|
||||
} else {
|
||||
if (info.encryption)
|
||||
virBufferAddLit(&buf, "encryption=on,");
|
||||
if (info.preallocate) {
|
||||
if (info.size_arg > info.allocation)
|
||||
virBufferAddLit(&buf, "preallocation=metadata,");
|
||||
else
|
||||
virBufferAddLit(&buf, "preallocation=falloc,");
|
||||
}
|
||||
}
|
||||
|
||||
if (info.preallocate) {
|
||||
if (info.size_arg > info.allocation)
|
||||
virBufferAddLit(&buf, "preallocation=metadata,");
|
||||
else
|
||||
virBufferAddLit(&buf, "preallocation=falloc,");
|
||||
}
|
||||
|
||||
if (info.nocow)
|
||||
|
Loading…
x
Reference in New Issue
Block a user