[PATCH 09/15] qemuBlockStorageSourceGetFormatRawProps: format 'offset' and 'size' for slice
Ján Tomko
jtomko at redhat.com
Thu Feb 6 15:39:12 UTC 2020
On Thu, Feb 06, 2020 at 08:52:01AM +0100, Peter Krempa wrote:
>If we have a 'format' type slice for a raw driver we can directly format
>the values.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_block.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
>diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
>index 63116ef5f2..5fac8c17b4 100644
>--- a/src/qemu/qemu_block.c
>+++ b/src/qemu/qemu_block.c
>@@ -1187,16 +1187,18 @@ qemuBlockStorageSourceGetFormatRawProps(virStorageSourcePtr src,
> secretalias = srcPriv->encinfo->s.aes.alias;
> }
>
>- /* currently unhandled properties for the 'raw' driver:
>- * 'offset'
>- * 'size'
>- */
>-
> if (virJSONValueObjectAdd(props,
> "s:driver", driver,
> "S:key-secret", secretalias, NULL) < 0)
> return -1;
>
>+ if (src->sliceFormat &&
>+ virJSONValueObjectAdd(props,
>+ "p:offset", src->sliceFormat->offset,
>+ "p:size", src->sliceFormat->size,
'P', these are unsigned long long
>+ NULL) < 0)
>+ return -1;
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/20200206/b7b09d36/attachment-0001.sig>
More information about the libvir-list
mailing list