Skip to contentSkip to conversation

qcow2: remove QCowL2Meta parameter from handle_copied

PATCH In review Yi Li 3 participants 4 messages Mar 9, 2020 – Mar 10, 2020 Block layer

lore
Share & tools
lore

Yi Li

author
#0 lore raw

PATCH 1/1 qcow2: remove QCowL2Meta parameter from handle_copied

The QCowL2Meta **m parameter is not used

---
 block/qcow2-cluster.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
block/qcow2-cluster.c +2 -2
index 17f1363..db9efa5 100644
@@ -1154,7 +1154,7 @@ static int handle_dependencies(BlockDriverState *bs, uint64_t guest_offset,
  *  -errno: in error cases
  */
 static int handle_copied(BlockDriverState *bs, uint64_t guest_offset,
-    uint64_t *host_offset, uint64_t *bytes, QCowL2Meta **m)
+    uint64_t *host_offset, uint64_t *bytes)
 {
     BDRVQcow2State *s = bs->opaque;
     int l2_index;
@@ -1567,7 +1567,7 @@ again:
         /*
          * 2. Count contiguous COPIED clusters.
          */
-        ret = handle_copied(bs, start, &cluster_offset, &cur_bytes, m);
+        ret = handle_copied(bs, start, &cluster_offset, &cur_bytes);
         if (ret < 0) {
             return ret;
         } else if (ret) {
Signature · 1 line
2.7.5
Reviewed-by on v1 1/1
#1 lore raw

CC qemu-block and qcow2 maintainers

(Use scripts/get_maintainer.pl to identify maintainers.)

Quoted 22 lines · Yi Li

The QCowL2Meta **m parameter is not used

---
 block/qcow2-cluster.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
block/qcow2-cluster.c +1 -1
index 17f1363..db9efa5 100644
@@ -1154,7 +1154,7 @@ static int handle_dependencies(BlockDriverState *bs, uint64_t guest_offset,
  *  -errno: in error cases
  */
 static int handle_copied(BlockDriverState *bs, uint64_t guest_offset,
-    uint64_t *host_offset, uint64_t *bytes, QCowL2Meta **m)
+    uint64_t *host_offset, uint64_t *bytes)
 {
     BDRVQcow2State *s = bs->opaque;
     int l2_index;

block/qcow2-cluster.c again: · line 1573

Quoted 8 lines
block/qcow2-cluster.c +1 -1
@@ -1567,7 +1567,7 @@ again:
         /*
          * 2. Count contiguous COPIED clusters.
          */
-        ret = handle_copied(bs, start, &cluster_offset, &cur_bytes, m);
+        ret = handle_copied(bs, start, &cluster_offset, &cur_bytes);
         if (ret < 0) {
             return ret;
         } else if (ret) {

Seems OK to me -- it is definitely unused. (Is _that_ a problem? For qcow2 maintainers to know.)

#2 lore raw
Quoted 11 lines · John Snow
Quoted 11 lines

static int handle_copied(BlockDriverState *bs, uint64_t guest_offset,

block/qcow2-cluster.c +1 -2
-    uint64_t *host_offset, uint64_t *bytes, QCowL2Meta **m)
+    uint64_t *host_offset, uint64_t *bytes)
 {
     BDRVQcow2State *s = bs->opaque;
     int l2_index;
@@ -1567,7 +1567,7 @@ again:
         /*
          * 2. Count contiguous COPIED clusters.
          */
-        ret = handle_copied(bs, start, &cluster_offset, &cur_bytes, m);
Quoted 8 lines

block/qcow2-cluster.c again: · line 1573

Quoted 5 lines
block/qcow2-cluster.c +1 -0
+        ret = handle_copied(bs, start, &cluster_offset, &cur_bytes);
         if (ret < 0) {
             return ret;
         } else if (ret) {

Seems OK to me -- it is definitely unused. (Is _that_ a problem? For qcow2 maintainers to know.)

It is unused now, but I'm using it in my subcluster allocation patches:

https://lists.gnu.org/archive/html/qemu-block/2019-12/msg00588.html

(I expect to send v4 soon, probably this week)

Berto

#3 lore raw
Quoted 21 lines · Alberto Garcia
Quoted 11 lines · John Snow
Quoted 11 lines

static int handle_copied(BlockDriverState *bs, uint64_t guest_offset,

block/qcow2-cluster.c +1 -2
-    uint64_t *host_offset, uint64_t *bytes, QCowL2Meta **m)
+    uint64_t *host_offset, uint64_t *bytes)
 {
     BDRVQcow2State *s = bs->opaque;
     int l2_index;
@@ -1567,7 +1567,7 @@ again:
         /*
          * 2. Count contiguous COPIED clusters.
          */
-        ret = handle_copied(bs, start, &cluster_offset, &cur_bytes, m);
Quoted 8 lines

block/qcow2-cluster.c again: · line 1573

Quoted 5 lines
block/qcow2-cluster.c +1 -0
+        ret = handle_copied(bs, start, &cluster_offset, &cur_bytes);
         if (ret < 0) {
             return ret;
         } else if (ret) {

Seems OK to me -- it is definitely unused. (Is _that_ a problem? For qcow2 maintainers to know.)

Quoted 8 lines

It is unused now, but I'm using it in my subcluster allocation patches:

   https://lists.gnu.org/archive/html/qemu-block/2019-12/msg00588.html

(I expect to send v4 soon, probably this week)

Berto

I had a hunch.

Thanks!