qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anton Nefedov <anton.nefedov@virtuozzo.com>
To: Max Reitz <mreitz@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, kwolf@redhat.com, eblake@redhat.com,
	stefanha@redhat.com, famz@redhat.com, den@virtuozzo.com,
	jcody@redhat.com, armbru@redhat.com, dgilbert@redhat.com
Subject: Re: [Qemu-devel] [PATCH 4/5] block-stream: add compress option
Date: Thu, 16 Nov 2017 13:11:37 +0300	[thread overview]
Message-ID: <aa7e78db-1604-547e-d11f-3c033de4feab@virtuozzo.com> (raw)
In-Reply-To: <b9d9b3f9-480c-6e59-0e8a-1fd4f5e84b6a@redhat.com>



On 15/11/2017 10:16 PM, Max Reitz wrote:
> On 2017-11-14 11:16, Anton Nefedov wrote:
>> Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
>> ---
>>   qapi/block-core.json      |  4 ++++
>>   include/block/block_int.h |  4 +++-
>>   block/stream.c            | 16 ++++++++++++----
>>   blockdev.c                | 13 ++++++++++++-
>>   hmp.c                     |  2 ++
>>   hmp-commands.hx           |  4 ++--
>>   6 files changed, 35 insertions(+), 8 deletions(-)
> 
> Looks good to me overall, two notes below.
> 
> Max
> 
>> diff --git a/qapi/block-core.json b/qapi/block-core.json
>> index ab96e34..b0d022f 100644
>> --- a/qapi/block-core.json
>> +++ b/qapi/block-core.json
>> @@ -2007,6 +2007,9 @@
>>   #
>>   # @speed:  the maximum speed, in bytes per second
>>   #
>> +# @compress: true to compress data, if the target format supports it.
>> +#            (default: false). Since 2.12.
>> +#
> 
> Too many full stops (one before, one after the parentheses).  Also, this
> makes it sound a bit like it would still be possible to specify this
> parameter even if the target doesn't support it (and it would just be
> ignored then), but that's not true.
> 
> Also, the format most parameter documentation follows for block-stream
> is more "@parameter: Description. Default. (Since version)".
> 
> So I'd suggest:
> 
> "true to compress data; may only be set if the target format supports
> it.  Defaults to false if omitted.  (Since 2.12)"
> 
> But I won't argue too much over the format, so the following is OK, too:
> 
> "true to compress data; may only be set if the target format supports it
> (default: false). (Since 2.12)"
> 

Thanks, will fix.

[..]

>> @@ -3034,11 +3039,17 @@ void qmp_block_stream(bool has_job_id, const char *job_id, const char *device,
>>           goto out;
>>       }
>>   
>> +    if (compress && bs->drv->bdrv_co_pwritev_compressed == NULL) {
>> +        error_setg(errp, "Compression is not supported for this drive %s",
>> +                   bdrv_get_device_name(bs));
> 
> I think just device instead of bdrv_get_device_name(bs) is better (or
> bdrv_get_device_or_node_name(bs) at least).
> 

device should be enough indeed, done.

/Anton

  reply	other threads:[~2017-11-16 10:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-14 10:16 [Qemu-devel] [PATCH 0/5] compressed block-stream Anton Nefedov
2017-11-14 10:16 ` [Qemu-devel] [PATCH 1/5] qcow2: reject unaligned offsets in write compressed Anton Nefedov
2017-11-14 16:50   ` [Qemu-devel] [PATCH 1/5 for-2.11?] " Eric Blake
2017-11-14 18:30     ` Anton Nefedov
2017-11-14 19:41       ` Eric Blake
2017-11-15 15:21   ` [Qemu-devel] [PATCH 1/5] " Max Reitz
2017-11-14 10:16 ` [Qemu-devel] [PATCH 2/5] qcow2: multiple clusters " Anton Nefedov
2017-11-15 15:11   ` Max Reitz
2017-11-15 16:28     ` Anton Nefedov
2017-11-15 16:30       ` Max Reitz
2017-11-21 17:42         ` Kevin Wolf
2017-11-23  9:04           ` Anton Nefedov
2017-11-23  9:44             ` Kevin Wolf
2017-11-14 10:16 ` [Qemu-devel] [PATCH 3/5] block: support compressed write for copy-on-read Anton Nefedov
2017-11-15 18:49   ` Max Reitz
2017-11-16 10:05     ` Anton Nefedov
2017-11-14 10:16 ` [Qemu-devel] [PATCH 4/5] block-stream: add compress option Anton Nefedov
2017-11-15 19:16   ` Max Reitz
2017-11-16 10:11     ` Anton Nefedov [this message]
2017-11-14 10:16 ` [Qemu-devel] [PATCH 5/5] iotest 030: add compressed block-stream test Anton Nefedov
2017-11-15 19:51   ` Max Reitz
2017-11-16 13:15     ` Anton Nefedov
2017-11-16  3:26 ` [Qemu-devel] [PATCH 0/5] compressed block-stream Fam Zheng
2017-11-16 10:04   ` Anton Nefedov

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=aa7e78db-1604-547e-d11f-3c033de4feab@virtuozzo.com \
    --to=anton.nefedov@virtuozzo.com \
    --cc=armbru@redhat.com \
    --cc=den@virtuozzo.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).