mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: block: Always set discard for storage nodes
Enabling discard for the storage node allows the format drivers to discard snapshots and other things, while configuration of the format layer actually decides whether to actually discard data on request from the host. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
b51016c73c
commit
0e6b60dcac
@ -1163,7 +1163,10 @@ qemuBlockStorageSourceGetBackendProps(virStorageSourcePtr src,
|
||||
if (qemuBlockStorageSourceGetBlockdevGetCacheProps(src, fileprops) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virJSONValueObjectAdd(fileprops, "b:read-only", src->readonly, NULL) < 0)
|
||||
if (virJSONValueObjectAdd(fileprops,
|
||||
"b:read-only", src->readonly,
|
||||
"s:discard", "unmap",
|
||||
NULL) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user