qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christian Brunner <chb@muc.de>
To: Stefan Weil <weil@mail.berlios.de>
Cc: Kevin Wolf <kwolf@redhat.com>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] block/rbd: Remove unused local variable
Date: Mon, 23 May 2011 11:01:13 +0200	[thread overview]
Message-ID: <BANLkTimP0C2Tesxwbai+8ofjdLGbN521cQ@mail.gmail.com> (raw)
In-Reply-To: <4DD8FC9D.3090200@mail.berlios.de>

2011/5/22 Stefan Weil <weil@mail.berlios.de>:
> Am 07.05.2011 22:15, schrieb Stefan Weil:
>>
>> cppcheck report:
>> rbd.c:246: style: Variable 'snap' is assigned a value that is never used
>>
>> Remove snap and the related code.
>>
>> Cc: Christian Brunner<chb@muc.de>
>> Cc: Kevin Wolf<kwolf@redhat.com>
>> Signed-off-by: Stefan Weil<weil@mail.berlios.de>
>> ---
>>  block/rbd.c |    4 ----
>>  1 files changed, 0 insertions(+), 4 deletions(-)
>>
>> diff --git a/block/rbd.c b/block/rbd.c
>> index 249a590..5c7d44e 100644
>> --- a/block/rbd.c
>> +++ b/block/rbd.c
>> @@ -524,7 +524,6 @@ static int rbd_open(BlockDriverState *bs, const char
>> *filename, int flags)
>>      RbdHeader1 *header;
>>      char pool[RBD_MAX_SEG_NAME_SIZE];
>>      char snap_buf[RBD_MAX_SEG_NAME_SIZE];
>> -    char *snap = NULL;
>>      char *hbuf = NULL;
>>      int r;
>>
>> @@ -533,9 +532,6 @@ static int rbd_open(BlockDriverState *bs, const char
>> *filename, int flags)
>>                        s->name, sizeof(s->name))<  0) {
>>          return -EINVAL;
>>      }
>> -    if (snap_buf[0] != '\0') {
>> -        snap = snap_buf;
>> -    }
>>
>>      if ((r = rados_initialize(0, NULL))<  0) {
>>          error_report("error initializing");
>>
>
> What about this patch? Can it be applied to the block branch?
>
> Regards,
> Stefan W.

No objections on my side. You can add:

Reviewed-by: Christian Brunner <chb@muc.de>

The questions is how we continue with the rbd driver. Recent ceph
versions had some changes in librados that are incompatible with the
current driver. We have to options now:

1. Change the function calls for new librados versions (I could
provide a patch for this).
2. Use librbd (see Josh's patches).

Using librbd simplifies the qemu driver a lot and gives us consistency
with the kernel driver. - I would prefer this. (Please note that there
is a race condition in the current librbd versions, that crashes qemu
under high i/o load, but I'm fairly confident, that Josh will have
sorted this out by the time 0.15 is released).

Regards,
Christian

  reply	other threads:[~2011-05-23  9:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-07 20:15 [Qemu-devel] [PATCH] block/rbd: Remove unused local variable Stefan Weil
2011-05-22 12:07 ` Stefan Weil
2011-05-23  9:01   ` Christian Brunner [this message]
2011-05-23 10:13     ` Stefan Hajnoczi
2011-05-23 10:26     ` Kevin Wolf
2011-05-27 18:32       ` Stefan Weil
2011-05-27 20:46         ` Christian Brunner
2011-06-10 20:05           ` [Qemu-devel] [PATCH v2] " Stefan Weil
2011-06-13 18:06             ` Josh Durgin
2011-06-14  8:01             ` Kevin Wolf

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=BANLkTimP0C2Tesxwbai+8ofjdLGbN521cQ@mail.gmail.com \
    --to=chb@muc.de \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=weil@mail.berlios.de \
    /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).