All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/2] blkdebug: Simplify and improve filename generation
Date: Tue, 11 Nov 2014 09:01:56 +0100	[thread overview]
Message-ID: <5461C274.8090106@redhat.com> (raw)
In-Reply-To: <54610ECF.4000301@redhat.com>

On 2014-11-10 at 20:15, Eric Blake wrote:
> On 11/10/2014 09:59 AM, Max Reitz wrote:
>> Instead of actually recreating the options from scratch, just reuse the
>> options given for creating the BDS, which are the configuration file
>> name and additional options. In case there are no additional options we
>> can thus create a plain filename.
>>
>> This obviously results in a different output for qemu-iotest 099 which
>> exactly tests this filename generation. Fix it up as well.
>>
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>>   block/blkdebug.c           | 98 +++++++++++++---------------------------------
>>   tests/qemu-iotests/099.out |  4 +-
>>   2 files changed, 29 insertions(+), 73 deletions(-)
>>
>>   
>> +    if (!force_json && bs->file->exact_filename[0]) {
>> +        snprintf(bs->exact_filename, sizeof(bs->exact_filename),
>> +                 "blkdebug:%s:%s", qdict_get_try_str(bs->options, "config"),
> If there is no "config" entry, this can pass NULL as a %s counterpart to
> snprintf, which is undefined behavior (works on glibc, but might crash
> elsewhere).

Well, depends on the definition of "works". "blkdebug:(null):foo" isn't 
that great either.

> Everything else looked okay, but I'm afraid I may have given you reason
> to post a v3 and make a kitten cry :(

I do have a reason to post a v3, but the kitten would have to cry only 
if I had to post a v3 because there were no reviews. This way, 
everything is fine, thank you very much for your reviews (on the other 
series as well). :-)

Max

  reply	other threads:[~2014-11-11  8:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10 16:59 [Qemu-devel] [PATCH v2 0/2] block: Improve filename generation for blkdebug Max Reitz
2014-11-10 16:59 ` [Qemu-devel] [PATCH v2 1/2] blkdebug: Simplify and improve filename generation Max Reitz
2014-11-10 19:15   ` Eric Blake
2014-11-11  8:01     ` Max Reitz [this message]
2014-11-10 16:59 ` [Qemu-devel] [PATCH v2 2/2] iotests: Plain blkdebug " Max Reitz
2014-11-10 19:17   ` Eric Blake
2014-11-10 17:00 ` [Qemu-devel] [PATCH v2 0/2] block: Improve filename generation for blkdebug Max Reitz

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=5461C274.8090106@redhat.com \
    --to=mreitz@redhat.com \
    --cc=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.