Skip to contentSkip to conversation

block/rbd: Remove unused local variable

PATCH Superseded Stefan Weil 5 participants 12 messages May 7, 2011 – Jun 14, 2011 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block/rbd: Remove unused local variable

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 <[email protected]>
Cc Kevin Wolf <[email protected]>
---
 block/rbd.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
block/rbd.c +0 -4
index 249a590..5c7d44e 100644
@@ -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");
Signature · 1 line
1.7.2.5
#1 lore raw

Am 07.05.2011 22:15, schrieb Stefan Weil:

Quoted 26 lines

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<[email protected]>
Cc Kevin Wolf<[email protected]>
---
  block/rbd.c |    4 ----
  1 files changed, 0 insertions(+), 4 deletions(-)
block/rbd.c +0 -1
index 249a590..5c7d44e 100644
@@ -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;
 

block/rbd.c static int rbd_open(BlockDriverState *bs, const char *filename, int flags) · line 537

Quoted 9 lines
block/rbd.c +0 -3
@@ -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.

Reviewed-by
#2 lore raw

2011/5/22 Stefan Weil <[email protected]>:

Quoted 36 lines

Am 07.05.2011 22:15, schrieb Stefan Weil:

Quoted 35 lines

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<[email protected]>
Cc Kevin Wolf<[email protected]>

---
 block/rbd.c |    4 ----

 1 files changed, 0 insertions(+), 4 deletions(-)
block/rbd.c +0 -4
index 249a590..5c7d44e 100644
@@ -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;
-    }
 
Quoted 8 lines
Quoted 3 lines
block/rbd.c +0 -0
      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:

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

#3 lore raw
Quoted 50 lines · Christian Brunner

2011/5/22 Stefan Weil <[email protected]>:

Quoted 36 lines

Am 07.05.2011 22:15, schrieb Stefan Weil:

Quoted 35 lines

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<[email protected]>
Cc Kevin Wolf<[email protected]>

---
 block/rbd.c |    4 ----

 1 files changed, 0 insertions(+), 4 deletions(-)
block/rbd.c +0 -4
index 249a590..5c7d44e 100644
@@ -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;
-    }
 
Quoted 8 lines
Quoted 3 lines
block/rbd.c +0 -0
      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:

Quoted 7 lines

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).

These are the patches that Josh posted a while ago but haven't been reviewed yet? I think they just need some attention and then should be merged.

Stefan

#4 lore raw
In reply to Christian Brunner

Am 23.05.2011 11:01, schrieb Christian Brunner:

Quoted 58 lines

2011/5/22 Stefan Weil <[email protected]>:

Quoted 36 lines

Am 07.05.2011 22:15, schrieb Stefan Weil:

Quoted 35 lines

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<[email protected]>
Cc Kevin Wolf<[email protected]>
---
 block/rbd.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
block/rbd.c +0 -4
index 249a590..5c7d44e 100644
@@ -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;
-    }
 
Quoted 8 lines
Quoted 3 lines
block/rbd.c +0 -0
     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:

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).

Quoted 5 lines

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).

The problem with Josh's patches (or basically anything related to the rbd driver) is that it hasn't received any review. I'm not familiar with librados and librbd, so reviewing rbd is even harder than other patches of the same size for me. Additionally, it's not a test environment that I have set up.

So going forward with it, I think we need a separate rbd maintainer. So Christian, I think it would be helpful if you at least reviewed any rbd patch and either comment on it or send an Acked-by, which basically tells me to commit it without any further checks. Or maybe we should consider that you send pull requests yourself if the patches touch only rbd code.

Kevin

#5 lore raw

PATCH 1/1 block/rbd: Remove unused local variable

Hi Josh,

I don't know if you followed this thread on the qemu list. I would sugest, that you resend the current patchset. I will review it and send an ack afterwards.

Please feel free to add your name to the header and the copyright.

Regards,
Christian

---------- Forwarded message ----------
From: Kevin Wolf <[email protected]>
Date: 2011/5/23
Subject: Re: [Qemu-devel] [PATCH] block/rbd: Remove unused local variable
To: [email protected]
Cc: QEMU Developers <[email protected]>

Am 23.05.2011 11:01, schrieb Christian Brunner:

Quoted 58 lines

2011/5/22 Stefan Weil <[email protected]>:

Quoted 36 lines

Am 07.05.2011 22:15, schrieb Stefan Weil:

Quoted 35 lines

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<[email protected]>
Cc Kevin Wolf<[email protected]>

---
 block/rbd.c |    4 ----

 1 files changed, 0 insertions(+), 4 deletions(-)
block/rbd.c +0 -4
index 249a590..5c7d44e 100644
@@ -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;
-    }
 
Quoted 8 lines
Quoted 3 lines
block/rbd.c +0 -0
      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:

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).

Quoted 5 lines

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).

The problem with Josh's patches (or basically anything related to the rbd driver) is that it hasn't received any review. I'm not familiar with librados and librbd, so reviewing rbd is even harder than other patches of the same size for me. Additionally, it's not a test environment that I have set up.

So going forward with it, I think we need a separate rbd maintainer. So Christian, I think it would be helpful if you at least reviewed any rbd patch and either comment on it or send an Acked-by, which basically tells me to commit it without any further checks. Or maybe we should consider that you send pull requests yourself if the patches touch only rbd code.

Kevin
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
Quoted 10 lines · Christian Brunner

Hi Josh,

I don't know if you followed this thread on the qemu list. I would sugest, that you resend the current patchset. I will review it and send an ack afterwards.

Please feel free to add your name to the header and the copyright.

Regards,
Christian

Hi Christian,

Thanks for pointing this out. I'll resend later today.

Josh

Quoted 86 lines

---------- Forwarded message ----------
From: Kevin Wolf <[email protected]>
Date: 2011/5/23
Subject: Re: [Qemu-devel] [PATCH] block/rbd: Remove unused local variable
To: [email protected]
Cc: QEMU Developers <[email protected]>

Am 23.05.2011 11:01, schrieb Christian Brunner:

Quoted 58 lines

2011/5/22 Stefan Weil <[email protected]>:

Quoted 36 lines

Am 07.05.2011 22:15, schrieb Stefan Weil:

Quoted 35 lines

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<[email protected]>
Cc Kevin Wolf<[email protected]>

---
 block/rbd.c |    4 ----

 1 files changed, 0 insertions(+), 4 deletions(-)
block/rbd.c +0 -4
index 249a590..5c7d44e 100644
@@ -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;
-    }
 
Quoted 8 lines
Quoted 3 lines
block/rbd.c +0 -0
      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:

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).

Quoted 5 lines

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).

The problem with Josh's patches (or basically anything related to the rbd driver) is that it hasn't received any review. I'm not familiar with librados and librbd, so reviewing rbd is even harder than other patches of the same size for me. Additionally, it's not a test environment that I have set up.

So going forward with it, I think we need a separate rbd maintainer. So Christian, I think it would be helpful if you at least reviewed any rbd patch and either comment on it or send an Acked-by, which basically tells me to commit it without any further checks. Or maybe we should consider that you send pull requests yourself if the patches touch only rbd code.

Quoted 5 lines

Kevin
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw
In reply to Kevin Wolf

Am 23.05.2011 12:26, schrieb Kevin Wolf:

Quoted 73 lines

Am 23.05.2011 11:01, schrieb Christian Brunner:

Quoted 60 lines

2011/5/22 Stefan Weil <[email protected]>:

Quoted 38 lines

Am 07.05.2011 22:15, schrieb Stefan Weil:

Quoted 37 lines

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<[email protected]>
Cc Kevin Wolf<[email protected]>

---
block/rbd.c | 4 ----

1 files changed, 0 insertions(+), 4 deletions(-)
block/rbd.c +0 -0
index 249a590..5c7d44e 100644
@@ -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;

block/rbd.c +0 -0
@@ -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;
- }

Quoted 8 lines
Quoted 3 lines

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:

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).

Quoted 5 lines

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).

The problem with Josh's patches (or basically anything related to the rbd driver) is that it hasn't received any review. I'm not familiar with librados and librbd, so reviewing rbd is even harder than other patches of the same size for me. Additionally, it's not a test environment that I have set up.

Quoted 8 lines

So going forward with it, I think we need a separate rbd maintainer. So Christian, I think it would be helpful if you at least reviewed any rbd patch and either comment on it or send an Acked-by, which basically tells me to commit it without any further checks. Or maybe we should consider that you send pull requests yourself if the patches touch only rbd code.

Kevin

This patch was reviewed by Christian, but is still in my queue of open patches. Kevin, could you please take it into the block queue?

Thanks,
Stefan W.

#8 lore raw

2011/5/27 Stefan Weil <[email protected]>:

Quoted 85 lines

Am 23.05.2011 12:26, schrieb Kevin Wolf:

Quoted 84 lines

Am 23.05.2011 11:01, schrieb Christian Brunner:

Quoted 63 lines

2011/5/22 Stefan Weil <[email protected]>:

Quoted 40 lines

Am 07.05.2011 22:15, schrieb Stefan Weil:

Quoted 38 lines

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<[email protected]>
Cc Kevin Wolf<[email protected]>

---
block/rbd.c | 4 ----

1 files changed, 0 insertions(+), 4 deletions(-)
block/rbd.c +0 -0
index 249a590..5c7d44e 100644
@@ -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;

block/rbd.c +0 -0
@@ -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;
- }

Quoted 8 lines
Quoted 3 lines

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:

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).

Quoted 5 lines

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).

The problem with Josh's patches (or basically anything related to the rbd driver) is that it hasn't received any review. I'm not familiar with librados and librbd, so reviewing rbd is even harder than other patches of the same size for me. Additionally, it's not a test environment that I have set up.

So going forward with it, I think we need a separate rbd maintainer. So Christian, I think it would be helpful if you at least reviewed any rbd patch and either comment on it or send an Acked-by, which basically tells me to commit it without any further checks. Or maybe we should consider that you send pull requests yourself if the patches touch only rbd code.

Quoted 8 lines
Quoted 1 line

Kevin

This patch was reviewed by Christian, but is still in my queue of open patches.
Kevin, could you please take it into the block queue?

Thanks,
Stefan W.

Kevin chose to merge josh's patches. This includes your patch.

Christian

#9 lore raw

PATCH v2 1/1 block/rbd: Remove unused local variable

Variable 'snap' is assigned a value that is never used. Remove snap and the related code.

v2:
The unused variable which was in function rbd_open is now in function qemu_rbd_create, so the patch needed an update.

Cc Christian Brunner <[email protected]>
Cc Josh Durgin <[email protected]>
Cc Kevin Wolf <[email protected]>
---
 block/rbd.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
block/rbd.c +0 -4
index bdc448a..d5659cd 100644
@@ -227,7 +227,6 @@ static int qemu_rbd_create(const char *filename, QEMUOptionParameter *options)
     char name[RBD_MAX_IMAGE_NAME_SIZE];
     char snap_buf[RBD_MAX_SNAP_NAME_SIZE];
     char conf[RBD_MAX_CONF_SIZE];
-    char *snap = NULL;
     rados_t cluster;
     rados_ioctx_t io_ctx;
     int ret;
@@ -238,9 +237,6 @@ static int qemu_rbd_create(const char *filename, QEMUOptionParameter *options)
                            conf, sizeof(conf)) < 0) {
         return -EINVAL;
     }
-    if (snap_buf[0] != '\0') {
-        snap = snap_buf;
-    }
 
     /* Read out options */
     while (options && options->name) {
Signature · 1 line
1.7.2.5
Reviewed-by on v2 1/1
#10 lore raw
Quoted 28 lines · Stefan Weil

Variable 'snap' is assigned a value that is never used. Remove snap and the related code.

v2:
The unused variable which was in function rbd_open is now in function qemu_rbd_create, so the patch needed an update.

Cc Christian Brunner<[email protected]>
Cc Josh Durgin<[email protected]>
Cc Kevin Wolf<[email protected]>
---
  block/rbd.c |    4 ----
  1 files changed, 0 insertions(+), 4 deletions(-)
block/rbd.c +0 -1
index bdc448a..d5659cd 100644
@@ -227,7 +227,6 @@ static int qemu_rbd_create(const char *filename, QEMUOptionParameter *options)
      char name[RBD_MAX_IMAGE_NAME_SIZE];
      char snap_buf[RBD_MAX_SNAP_NAME_SIZE];
      char conf[RBD_MAX_CONF_SIZE];
-    char *snap = NULL;
      rados_t cluster;
      rados_ioctx_t io_ctx;
      int ret;

block/rbd.c static int qemu_rbd_create(const char *filename, QEMUOptionParameter *options) · line 242

Quoted 9 lines
block/rbd.c +0 -3
@@ -238,9 +237,6 @@ static int qemu_rbd_create(const char *filename, QEMUOptionParameter *options)
                             conf, sizeof(conf))<  0) {
          return -EINVAL;
      }
-    if (snap_buf[0] != '\0') {
-        snap = snap_buf;
-    }
 
      /* Read out options */
      while (options&&  options->name) {

Looks good to me:

Applied
#11 lore raw
In reply to Stefan Weil

Am 10.06.2011 22:05, schrieb Stefan Weil:

Quoted 11 lines

Variable 'snap' is assigned a value that is never used. Remove snap and the related code.

v2:
The unused variable which was in function rbd_open is now in function qemu_rbd_create, so the patch needed an update.

Cc Christian Brunner <[email protected]>
Cc Josh Durgin <[email protected]>
Cc Kevin Wolf <[email protected]>

Thanks, applied to the block branch.

Kevin