qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	"open list:Network Block Dev..." <qemu-block@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] nbd/client: Fix error messages during NBD_INFO_BLOCK_SIZE
Date: Tue, 1 May 2018 15:15:11 -0500	[thread overview]
Message-ID: <5a27e685-e1e6-ccad-1ee7-acece995ab4a@redhat.com> (raw)
In-Reply-To: <6747056a-f73f-273a-3f4f-3cab3081b587@virtuozzo.com>

On 05/01/2018 10:55 AM, Vladimir Sementsov-Ogievskiy wrote:
> 01.05.2018 18:46, Eric Blake wrote:
>> A missing space makes for poor error messages.  Also, we missed
>> diagnosing a server that sends a maximum block size less than
>> the minimum.
>>
>> Fixes: 081dd1fe
>> CC: qemu-stable@nongnu.org
>> Signed-off-by: Eric Blake <eblake@redhat.com>
> 
> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> 
>> ---
>>   nbd/client.c | 10 ++++++++--
>>   1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/nbd/client.c b/nbd/client.c
>> index 7f35b5c3232..7b3caa90ec2 100644
>> --- a/nbd/client.c
>> +++ b/nbd/client.c
>> @@ -436,7 +436,7 @@ static int nbd_opt_go(QIOChannel *ioc, const char 
>> *wantname,
>>               be32_to_cpus(&info->min_block);
>>               if (!is_power_of_2(info->min_block)) {
>>                   error_setg(errp, "server minimum block size %" PRId32
>> -                           "is not a power of two", info->min_block);
>> +                           " is not a power of two", info->min_block);

One more tweak: PRIu32 is better than PRId32, as block sizes cannot go 
negative.  I'm squashing that in, then staging this on my NBD queue.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

      reply	other threads:[~2018-05-01 20:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-01 15:46 [Qemu-devel] [PATCH] nbd/client: Fix error messages during NBD_INFO_BLOCK_SIZE Eric Blake
2018-05-01 15:55 ` Vladimir Sementsov-Ogievskiy
2018-05-01 20:15   ` Eric Blake [this message]

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=5a27e685-e1e6-ccad-1ee7-acece995ab4a@redhat.com \
    --to=eblake@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=vsementsov@virtuozzo.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).