qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Greg Kurz <groug@kaod.org>
Cc: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com>,
	Pradeep Jagadeesh <pradeepkiruvale@gmail.com>,
	alberto garcia <berto@igalia.com>,
	jani kokkonen <jani.kokkonen@huawei.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 4/4] fsdev: QMP interface for throttling
Date: Wed, 17 May 2017 12:09:33 -0500	[thread overview]
Message-ID: <6df407d5-4145-2e90-a7eb-b047819ceb75@redhat.com> (raw)
In-Reply-To: <20170517182938.0c7f366e@bahia.lan>

[-- Attachment #1: Type: text/plain, Size: 1856 bytes --]

On 05/17/2017 11:29 AM, Greg Kurz wrote:

>>
>> First point: is fsdev a Linux-only feature, or can it be compiled on
>> BSD?  If it is Linux-only, then compiling a stub for Windows will still
>> leave BSD broken, and your #ifdef is wrong.  Fixing compilation on mingw
>> is nice, but not the only platform to worry about.
>>
> 
> fsdev compilation currently depends on CONFIG_VIRTFS which is a Linux-only
> feature for the moment. There was a tentative to support it on Windows hosts
> two years ago but it stayed at the RFC stage.
> 
> But even on Linux hosts, the current fsdev implementation also depends on
> the target supporting PCI and VIRTIO. We have a fsdev/qemu-fsdev-dummy.c
> file to put stubs so that we don't pull all the code for such targets.
> 
> Maybe this could be reused for the above stubs as well ?

That helps.  The stub should live in qemu-fsdev-dummy.c (where it
shouldn't need any #ifdef, because that file is only compiled when the
condition is false), and...

> 
>> Second point: if fsdev is indeed a platform-specific feature, then we
>> don't want to advertise the QMP commands that are useless when running
>> on a platform that doesn't support it. Anywhere you have to add a stub
>> for compilation means you ALSO need to patch monitor.c to unregister the
>> command from being advertised as a valid QMP command.  (If you used
>> #ifdef __LINUX__ to guard the working version, and #ifndef __LINUX__ to
>> declare the stub, then the monitor.c needs an #ifndef section within
>> qmp_unregister_commands_hack() to tell QMP to not advertise the stubs.)

monitor.c should wrap the unregister under #ifndef CONFIG_VIRTFS (rather
than a particular platform name).

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-05-17 17:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10  8:41 [Qemu-devel] [PATCH v4 0/4] fsdev: qmp interface for io throttling Pradeep Jagadeesh
2017-05-10  8:41 ` [Qemu-devel] [PATCH v4 1/4] throttle: factor out duplicate code Pradeep Jagadeesh
2017-05-10 14:12   ` Greg Kurz
2017-05-10 15:27     ` Pradeep Jagadeesh
2017-05-10 19:48       ` Eric Blake
2017-05-11 16:12         ` Pradeep Jagadeesh
2017-05-10  8:41 ` [Qemu-devel] [PATCH v4 2/4] qmp: Create IOThrottle structure Pradeep Jagadeesh
2017-05-10  8:41 ` [Qemu-devel] [PATCH v4 3/4] qmp: refactor duplicate code Pradeep Jagadeesh
2017-05-10 19:56   ` Eric Blake
2017-05-11 16:14     ` Pradeep Jagadeesh
2017-05-11  7:50   ` Greg Kurz
2017-05-12  8:03     ` Pradeep Jagadeesh
2017-06-08 14:20       ` Greg Kurz
2017-06-09  8:32         ` Pradeep Jagadeesh
2017-05-10  8:41 ` [Qemu-devel] [PATCH v4 4/4] fsdev: QMP interface for throttling Pradeep Jagadeesh
2017-05-10 20:00   ` Eric Blake
2017-05-17 14:53     ` Pradeep Jagadeesh
2017-05-17 15:28       ` Eric Blake
2017-05-17 16:29         ` Greg Kurz
2017-05-17 17:09           ` Eric Blake [this message]
2017-05-18 13:30             ` Pradeep Jagadeesh
2017-06-08 16:49               ` Greg Kurz
2017-06-09  8:31                 ` Pradeep Jagadeesh
2017-06-09  9:07                   ` Greg Kurz
2017-06-09  9:13                     ` Pradeep Jagadeesh
2017-06-09  9:20                       ` Greg Kurz
2017-05-10 10:02 ` [Qemu-devel] [PATCH v4 0/4] fsdev: qmp interface for io throttling no-reply

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=6df407d5-4145-2e90-a7eb-b047819ceb75@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).