From: Eric Blake <eblake@redhat.com>
To: xiezhide <xiezhide@huawei.com>, qemu-devel@nongnu.org
Cc: groug@kaod.org, aneesh.kumar@linux.vnet.ibm.com,
armbru@redhat.com, berto@igalia.com, zengcanfu@huawei.com,
jinxuefeng@huawei.com, chenhui.rtos@huawei.com
Subject: Re: [Qemu-devel] [PATCH v4 1/4] fsdev-throttle-qmp: factor out throttle code to reuse code
Date: Thu, 15 Nov 2018 14:55:46 -0600 [thread overview]
Message-ID: <078c1065-1e36-5f70-92f0-044b0d4daefe@redhat.com> (raw)
In-Reply-To: <0fcad1d4a27bcf9066d3349e8f1a8af6dfe3bb6e.1542301855.git.xiezhide@huawei.com>
On 11/15/18 2:54 AM, xiezhide wrote:
> This patch factor out throttle parameter parse code to common function
s/factor/factors/
Actually, when I write commit messages, I like to use the imperative
mood, with an implicit "Apply this patch in order to" unspoken prefix.
Starting with an explicit "This patch does" is more of a descriptive
mood. So I might have written:
Factor out the throttle parameter parsing code to a new common function
which will be used by block and fsdev.
> which will be used by block and fsdev.
> rename function throttle_parse_options to throttle_parse_group to resolve
> function name conflict
>
> Signed-off-by: xiezhide <xiezhide@huawei.com>
> ---
> block/throttle.c | 6 ++--
> blockdev.c | 43 +-------------------------
> fsdev/qemu-fsdev-throttle.c | 44 ++------------------------
> include/qemu/throttle-options.h | 2 ++
> include/qemu/throttle.h | 4 +--
> include/qemu/typedefs.h | 1 +
> util/throttle.c | 68 +++++++++++++++++++++++++++++++++++++++++
> 7 files changed, 79 insertions(+), 89 deletions(-)
>
> +++ b/include/qemu/throttle-options.h
> @@ -111,4 +111,6 @@
> .help = "when limiting by iops max size of an I/O in bytes",\
> }
>
> +void throttle_parse_options(ThrottleConfig *, QemuOpts *);
It's okay to use parameter names in function declarations.
> +++ b/include/qemu/typedefs.h
> @@ -113,6 +113,7 @@ typedef struct uWireSlave uWireSlave;
> typedef struct VirtIODevice VirtIODevice;
> typedef struct Visitor Visitor;
> typedef struct node_info NodeInfo;
> +typedef struct ThrottleConfig ThrottleConfig;
Please keep this in the right sorted location, right after SSIBus.
[Hmm, we already have an inconsistency on whether we are sorting by
en_US rules, which are case-insensitive and therefore has 'struct
node_info' in the wrong location, or by C rules which sort lowercase
later and therefore has 'struct uWireSlave' in the wrong position. For
that matter, why are we renaming 'struct node_info NodeInfo', and why
does uWireSlave violate our naming conventions? But those are
independent cleanups, and not necessarily something for you to worry about]
With the sorting fixed,
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2018-11-15 20:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 8:54 [Qemu-devel] [PATCH v4 0/4] fsdev-throttle-qmp: qmp interface for fsdev io throttling xiezhide
2018-11-15 8:54 ` [Qemu-devel] [PATCH v4 1/4] fsdev-throttle-qmp: factor out throttle code to reuse code xiezhide
2018-11-15 20:55 ` Eric Blake [this message]
2018-11-16 8:24 ` xiezhide
2018-11-15 8:55 ` [Qemu-devel] [PATCH v4 2/4] fsdev-throttle-qmp: move struct ThrottleLimits to new file xiezhide
2018-11-15 21:41 ` Eric Blake
2018-11-15 22:02 ` Eric Blake
2018-11-16 8:19 ` xiezhide
2018-11-16 8:21 ` xiezhide
2018-11-16 15:03 ` Eric Blake
2018-11-15 8:55 ` [Qemu-devel] [PATCH v4 3/4] fsdev-throttle-qmp: qmp interface for fsdev io throttling xiezhide
2018-11-15 8:55 ` [Qemu-devel] [PATCH v4 4/4] fsdev-throttle-qmp: hmp " xiezhide
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=078c1065-1e36-5f70-92f0-044b0d4daefe@redhat.com \
--to=eblake@redhat.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=armbru@redhat.com \
--cc=berto@igalia.com \
--cc=chenhui.rtos@huawei.com \
--cc=groug@kaod.org \
--cc=jinxuefeng@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=xiezhide@huawei.com \
--cc=zengcanfu@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).