qemuBlockStorageSourceNeedsStorageSliceLayer: Deal with 'luks' files

The 'luks' driver in qemu is as any other non-raw format driver and thus
doesn't support the properties for 'slice'. Since libvirt considers
luks files to be raw+encryption we need to special case them when
dealing with the slice.

https://bugzilla.redhat.com/show_bug.cgi?id=1814975

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa
2020-03-19 16:54:52 +01:00
parent a8bcbb4217
commit 7393be3bbc
2 changed files with 8 additions and 1 deletions

View File

@@ -3324,5 +3324,9 @@ qemuBlockStorageSourceNeedsStorageSliceLayer(const virStorageSource *src)
if (src->format != VIR_STORAGE_FILE_RAW)
return true;
if (src->encryption &&
src->encryption->format == VIR_STORAGE_ENCRYPTION_FORMAT_LUKS)
return true;
return false;
}