From: Eric Blake <eblake@redhat.com>
To: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com>,
Pradeep Jagadeesh <pradeepkiruvale@gmail.com>,
Greg Kurz <groug@kaod.org>
Cc: Alberto Garcia <berto@igalia.com>,
Jani Kokkonen <jani.kokkonen@huawei.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v0] fsdev: QMP interface for throttling
Date: Tue, 21 Mar 2017 09:38:19 -0500 [thread overview]
Message-ID: <d21fbdc6-1eb4-27aa-1a32-a381cd9780ae@redhat.com> (raw)
In-Reply-To: <d149478f-fb4e-6699-5508-570a5bf27869@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]
On 03/21/2017 04:44 AM, Pradeep Jagadeesh wrote:
>>
>> You're introducing this struct in 2.10, so this member is not since 1.7.
>> Either that, or you're copying-and-pasting when you should be sharing
>> code and reusing an existing struct.
> Hmm..copied the block devices code, I will correct it.
> I thought of reusing the code, but the whole struct from block devices
> can not be used, as there is one member called "group" that is not used
> in case of 9p.
Then make a common base type with the common fields, and have the block
devices use a subtype that reuses the base type and adds the additional
field 'group'.
> Also this needs lot of changes even in case of block
> devices. Because I may need to rename the structure as IOThrottle or
> something like that.
Yes, type names may have a ripple effect. But when done as a series,
separating the mechanical changes from the semantic changes, it's still
fairly easy to review, and worth it in the long run.
> Shall I reuse the code and avoid setting the group member in case of 9p?
> What do you think?
Better than avoiding the group member by avoiding it is avoiding it by
not having it in the type, by using type inheritance to your advantage.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2017-03-21 14:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-20 13:07 [Qemu-devel] [PATCH v0] fsdev: QMP interface for throttling Pradeep Jagadeesh
2017-03-20 13:17 ` Daniel P. Berrange
2017-03-21 9:25 ` Pradeep Jagadeesh
2017-04-03 10:59 ` Daniel P. Berrange
2017-03-20 13:46 ` no-reply
2017-03-21 1:15 ` Eric Blake
2017-03-21 9:44 ` Pradeep Jagadeesh
2017-03-21 12:06 ` Greg Kurz
2017-03-23 12:07 ` Pradeep Jagadeesh
2017-03-21 14:38 ` Eric Blake [this message]
2017-03-21 13:38 ` Greg Kurz
2017-03-22 9:23 ` Pradeep Jagadeesh
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=d21fbdc6-1eb4-27aa-1a32-a381cd9780ae@redhat.com \
--to=eblake@redhat.com \
--cc=berto@igalia.com \
--cc=groug@kaod.org \
--cc=jani.kokkonen@huawei.com \
--cc=pradeep.jagadeesh@huawei.com \
--cc=pradeepkiruvale@gmail.com \
--cc=qemu-devel@nongnu.org \
/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).