From: Peter Lieven <pl@kamp.de>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, lersek@redhat.com,
den@openvz.org, mreitz@redhat.com, eblake@redhat.com,
berrange@redhat.com, Peter Lieven <pl@kamp.de>
Subject: [Qemu-devel] [PATCH V4 10/10] block/qcow2: add compress info to image specific info
Date: Thu, 20 Jul 2017 16:20:41 +0200 [thread overview]
Message-ID: <1500560441-5670-11-git-send-email-pl@kamp.de> (raw)
In-Reply-To: <1500560441-5670-1-git-send-email-pl@kamp.de>
Signed-off-by: Peter Lieven <pl@kamp.de>
---
block/qcow2.c | 9 +++++++++
qapi/block-core.json | 6 +++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 0ba5977..59cf3b3 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -3942,6 +3942,15 @@ static ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *bs)
spec_info->u.qcow2.data->encrypt = qencrypt;
}
+ if (s->compress_format != -1) {
+ Qcow2Compress *qcompress = g_new0(Qcow2Compress, 1);
+ qcompress->format = s->compress_format;
+ qcompress->level = s->compress_level;
+ qcompress->has_level = true;
+ spec_info->u.qcow2.data->compress = qcompress;
+ spec_info->u.qcow2.data->has_compress = true;
+ }
+
return spec_info;
}
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 9eb76df..9310715 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -68,6 +68,9 @@
# @encrypt: details about encryption parameters; only set if image
# is encrypted (since 2.10)
#
+# @compress: details about parameters for compressed clusters; only set if
+# the compress format header extension is present (since 2.10)
+#
# Since: 1.7
##
{ 'struct': 'ImageInfoSpecificQCow2',
@@ -76,7 +79,8 @@
'*lazy-refcounts': 'bool',
'*corrupt': 'bool',
'refcount-bits': 'int',
- '*encrypt': 'ImageInfoSpecificQCow2Encryption'
+ '*encrypt': 'ImageInfoSpecificQCow2Encryption',
+ '*compress': 'Qcow2Compress'
} }
##
--
1.9.1
next prev parent reply other threads:[~2017-07-20 14:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 14:20 [Qemu-devel] [PATCH V4 00/10] add Qcow2 compress format extension Peter Lieven
2017-07-20 14:20 ` [Qemu-devel] [PATCH V4 01/10] specs/qcow2: add " Peter Lieven
2017-07-20 15:52 ` Eric Blake
2017-07-20 16:26 ` Peter Lieven
2017-07-20 18:31 ` Eric Blake
2017-07-20 18:59 ` Peter Lieven
2017-07-20 14:20 ` [Qemu-devel] [PATCH V4 02/10] qapi/block-core: add Qcow2Compress parameters Peter Lieven
2017-07-20 14:20 ` [Qemu-devel] [PATCH V4 03/10] block/qcow2: parse compress create options Peter Lieven
2017-07-20 14:20 ` [Qemu-devel] [PATCH V4 04/10] qemu-img: add documentation for compress settings Peter Lieven
2017-07-20 14:20 ` [Qemu-devel] [PATCH V4 05/10] block/qcow2: read and write the compress format extension Peter Lieven
2017-07-20 14:20 ` [Qemu-devel] [PATCH V4 06/10] block/qcow2: simplify ret usage in qcow2_create Peter Lieven
2017-07-20 14:20 ` [Qemu-devel] [PATCH V4 07/10] block/qcow2: optimize qcow2_co_pwritev_compressed Peter Lieven
2017-07-20 14:20 ` [Qemu-devel] [PATCH V4 08/10] block/qcow2: start using the compress format extension Peter Lieven
2017-07-20 16:00 ` Eric Blake
2017-07-20 16:30 ` Peter Lieven
2017-07-20 19:19 ` Eric Blake
2017-07-21 8:50 ` Peter Lieven
2017-07-20 14:20 ` [Qemu-devel] [PATCH V4 09/10] block/qcow2: add lzo compress format Peter Lieven
2017-07-20 16:03 ` Eric Blake
2017-07-20 16:30 ` Peter Lieven
2017-07-20 14:20 ` Peter Lieven [this message]
2017-07-20 16:05 ` [Qemu-devel] [PATCH V4 10/10] block/qcow2: add compress info to image specific info Eric Blake
2017-07-20 16:33 ` Peter Lieven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1500560441-5670-11-git-send-email-pl@kamp.de \
--to=pl@kamp.de \
--cc=berrange@redhat.com \
--cc=den@openvz.org \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=lersek@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).