qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 3/4] qmp: refactor duplicate code


From: Pradeep Jagadeesh
Subject: Re: [Qemu-devel] [PATCH v4 3/4] qmp: refactor duplicate code
Date: Thu, 11 May 2017 18:14:57 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1

On 5/10/2017 9:56 PM, Eric Blake wrote:
On 05/10/2017 03:41 AM, Pradeep Jagadeesh wrote:
This patch factor out the duplicate qmp throttle interface code
that was present in both block and fsdev device files.

Signed-off-by: Pradeep Jagadeesh <address@hidden>
---
 blockdev.c                      | 53 +++-------------------------------------
 hmp.c                           | 21 +++++++++++-----
 include/qemu/throttle-options.h |  2 ++
 util/throttle-options.c         | 54 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 74 insertions(+), 56 deletions(-)


+++ b/include/qemu/throttle-options.h
@@ -94,4 +94,6 @@

 void parse_io_throttle_options(ThrottleConfig *, QemuOpts *);

+void qmp_set_io_throttle(ThrottleConfig *, IOThrottle *);

I don't think this is the right name for this function.  You are not
adding a new QMP command (you didn't modify a .json file to add
'set-io-throttle').  As mentioned in patch 1/4, you can probably reuse
the existing util/throttle.c instead of throttle-options.c, and name
this something starting with throttle_ rather than with qmp_.

OK

-Pradeep





reply via email to

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