[PATCH 02/18] qemuBlockStorageSourceGetBackendProps: Allow skipping "discard":"unmap"

Ján Tomko jtomko at redhat.com
Wed Jul 15 21:54:20 UTC 2020


On a Friday in 2020, Peter Krempa wrote:
>It doesn't make sense to format "discard" when doing a -blockdev backend
>of scsi-generic used with SCSI hostdevs. Add a way to skip it.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_block.c | 8 ++++++++
> src/qemu/qemu_block.h | 1 +
> 2 files changed, 9 insertions(+)
>
>diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
>index 10ddf53b3b..bdd07d9925 100644
>--- a/src/qemu/qemu_block.c
>+++ b/src/qemu/qemu_block.c
>@@ -1061,6 +1061,9 @@ qemuBlockStorageSourceGetBlockdevGetCacheProps(virStorageSourcePtr src,
>  *      omit any data which does not identify the image itself
>  *  QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY:
>  *      use the auto-read-only feature of qemu
>+ *  QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_SKIP_UNMAP:
>+ *      don't enable 'discard:unmap' option for passing through dicards

discards

>+ *      (note that this is disabled also for _LEGACY and _TARGET_ONLY options)
>  *

So outside of tests, this is (currently) used by one out of three
callers. Would it make sense to negate the option?

>  * Creates a JSON object describing the underlying storage or protocol of a
>  * storage source. Returns NULL on error and reports an appropriate error message.

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200715/615560e1/attachment-0001.sig>


More information about the libvir-list mailing list