提交 b5c8c547 编写于 作者: J John Ferlan

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: NJohn Ferlan <jferlan@redhat.com>
上级 c46fc572
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册