qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qemu-img: simplify img_convert


From: Peter Lieven
Subject: Re: [Qemu-devel] [PATCH] qemu-img: simplify img_convert
Date: Mon, 6 Mar 2017 18:15:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

Am 06.03.2017 um 17:46 schrieb Eric Blake:
On 02/28/2017 07:35 AM, Peter Lieven wrote:
img_convert has been around before there was an ImgConvertState or
a block backend, but it has never been modified to directly use
these structs. Change this by parsing parameters directly into
the ImgConvertState and directly use BlockBackend where possible.
Futhermore variable initalization has been reworked and sorted.
s/Futhermore/Furthermore/
s/initalization/initialization/

I almost wonder if this should be split into multiple patches for ease
of review.  But since you've already submitted it, I'll review it as-is.

Signed-off-by: Peter Lieven <address@hidden>
---
  qemu-img.c | 197 +++++++++++++++++++++++++------------------------------------
  1 file changed, 81 insertions(+), 116 deletions(-)

diff --git a/qemu-img.c b/qemu-img.c
index caa76a7..f271167 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1488,7 +1488,7 @@ typedef struct ImgConvertState {
      int min_sparse;
      size_t cluster_sectors;
      size_t buf_sectors;
-    int num_coroutines;
+    long num_coroutines;
Why is this change needed? A hint in the commit message may be
appropriate (I'm especially wary of 'long', as it differs between 32-
and 64-bit platforms).

This is long because it is passed as a pointer to qemu_strtol. num_coroutines
was also long.

Peter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]