From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOR0m-000205-2Q for qemu-devel@nongnu.org; Mon, 23 May 2011 05:01:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOR0k-0000qU-R3 for qemu-devel@nongnu.org; Mon, 23 May 2011 05:01:16 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:38500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOR0k-0000qQ-Ne for qemu-devel@nongnu.org; Mon, 23 May 2011 05:01:14 -0400 Received: by vws17 with SMTP id 17so4515860vws.4 for ; Mon, 23 May 2011 02:01:13 -0700 (PDT) MIME-Version: 1.0 Sender: c.m.brunner@gmail.com In-Reply-To: <4DD8FC9D.3090200@mail.berlios.de> References: <1304799357-19281-1-git-send-email-weil@mail.berlios.de> <4DD8FC9D.3090200@mail.berlios.de> Date: Mon, 23 May 2011 11:01:13 +0200 Message-ID: From: Christian Brunner Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] block/rbd: Remove unused local variable Reply-To: chb@muc.de List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Kevin Wolf , QEMU Developers 2011/5/22 Stefan Weil : > 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 >> Cc: Kevin Wolf >> Signed-off-by: Stefan Weil >> --- >> =A0block/rbd.c | =A0 =A04 ---- >> =A01 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) >> =A0 =A0 =A0RbdHeader1 *header; >> =A0 =A0 =A0char pool[RBD_MAX_SEG_NAME_SIZE]; >> =A0 =A0 =A0char snap_buf[RBD_MAX_SEG_NAME_SIZE]; >> - =A0 =A0char *snap =3D NULL; >> =A0 =A0 =A0char *hbuf =3D NULL; >> =A0 =A0 =A0int r; >> >> @@ -533,9 +532,6 @@ static int rbd_open(BlockDriverState *bs, const char >> *filename, int flags) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0s->name, sizeof(s->name))= < =A00) { >> =A0 =A0 =A0 =A0 =A0return -EINVAL; >> =A0 =A0 =A0} >> - =A0 =A0if (snap_buf[0] !=3D '\0') { >> - =A0 =A0 =A0 =A0snap =3D snap_buf; >> - =A0 =A0} >> >> =A0 =A0 =A0if ((r =3D rados_initialize(0, NULL))< =A00) { >> =A0 =A0 =A0 =A0 =A0error_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 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