qemu-devel
[Top][All Lists]
Advanced

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

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


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

On 5/3/2017 7:21 PM, Greg Kurz wrote:
On Tue, 2 May 2017 17:15:02 -0500
Eric Blake <address@hidden> wrote:

On 05/02/2017 09:29 AM, Pradeep Jagadeesh wrote:
This patchset factor out the duplicate qmp throttle interface code
that was present in both block and fsdev device files.

Instead of adding the duplicate code in patch 2 then cleaning it out
here, you should refactor this patch to be first (fix existing code in
blockdev.c to make use of the new interfaces), then add the new fsdev
code that uses this code right away.


Yeah I second that.

Pradeep,

When you worked on the command line version for 2.9, I didn't really know
what we would be able to share between fsdev and blockdev... I had hence
asked to code it separately and then factor out. The situation is different
here: the core throttling code is in place for both fsdev and blockdev. We
really want to share as much code as possible. So you probably should move
this patch and maybe the next one in front and then have fsdev to use the
new code as Eric is suggesting.

OK, Sure. I will do.

Cheers,

--
Greg


Signed-off-by: Pradeep Jagadeesh <address@hidden>
---
 blockdev.c                      | 53 +++----------------------------------
 fsdev/qemu-fsdev-throttle.c     | 51 +-----------------------------------
 fsdev/qemu-fsdev.c              |  1 -
 hmp.c                           | 34 ++++++++++++------------
 include/qemu/throttle-options.h |  5 ++++
 util/Makefile.objs              |  1 +
 util/throttle-options.c         | 58 +++++++++++++++++++++++++++++++++++++++++
 7 files changed, 85 insertions(+), 118 deletions(-)
 create mode 100644 util/throttle-options.c






reply via email to

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