qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Eric Blake <eblake@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"qemu-block@nongnu.org" <qemu-block@nongnu.org>
Cc: "armbru@redhat.com" <armbru@redhat.com>,
	"kwolf@redhat.com" <kwolf@redhat.com>,
	"mreitz@redhat.com" <mreitz@redhat.com>,
	Denis Lunev <den@virtuozzo.com>,
	Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>,
	"jsnow@redhat.com" <jsnow@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] qapi: support device id for x-block-latency-histogram-set
Date: Tue, 2 Oct 2018 14:58:42 +0000	[thread overview]
Message-ID: <3c64931c-014a-3911-2ff8-4ac3cfef84b3@virtuozzo.com> (raw)
In-Reply-To: <e1e14dad-78bc-f504-9f7f-738ca53af3f6@redhat.com>

02.10.2018 17:35, Eric Blake wrote:
> On 10/2/18 9:30 AM, Vladimir Sementsov-Ogievskiy wrote:
>
>>>> -# @device: device name to set latency histogram for.
>>>> +# @device: device name to set latency histogram for (better use @id).
>>>> +#
>>>> +# @id: The name or QOM path of the guest device.
>>>
>>> As long as we are renaming the command, there's no need to keep a 
>>> legacy parameter around. Just get rid of device and replace it by 
>>> id, rather than worrying about both.  The introduction of the stable 
>>> command does not have to carry any baggage left over from the x- 
>>> preliminary version.
>>>
>>
>> Libvirt don't need both for now, for different scenarios?
>
> If you want both to work because libvirt has reasons to use both, then 
> the documentation needs to be more precise. "(better use @id)" does 
> not tell me why I shouldn't use @device, or what difference in 
> behavior I get by using one instead of the other. Furthermore, if @id 
> is able to use the name of the guest device as an alternative to the 
> QOM path, then how is that different from @device being the name of 
> the guest device?
>

Hm. It all looks a bit weird. I've just duplicated block_set_io_throttle 
interface:

# @device: Block device name (deprecated, use @id instead)
#
# @id: The name or QOM path of the guest device (since: 2.8)

     blk = qmp_get_blk(arg->has_device ? arg->device : NULL,
                       arg->has_id ? arg->id : NULL,
errp);
     if (!blk) {
return;
     }


So, looks like "The name or" is wrong part. @id can be only path.

However, I can call blk_by_name on @id, if blk_by_qdev_id failed..

So, variants:

1. both parameters, current code, but fix documentation (will be @id: 
QOM path of the guest device.)
2. only @id and only QOM path
3. only @id, but fullback to blk_by_name(@id) if failed to find qdev.

Any option is ok for me, I don't care. What do you think?


-- 
Best regards,
Vladimir


  reply	other threads:[~2018-10-02 14:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02 11:33 [Qemu-devel] [PATCH 0/2] improve block-latency-histogram-set Vladimir Sementsov-Ogievskiy
2018-10-02 11:33 ` [Qemu-devel] [PATCH 1/2] qapi: support device id for x-block-latency-histogram-set Vladimir Sementsov-Ogievskiy
2018-10-02 14:22   ` Eric Blake
2018-10-02 14:30     ` Nikolay Shirokovskiy
2018-10-02 14:30     ` Vladimir Sementsov-Ogievskiy
2018-10-02 14:35       ` Eric Blake
2018-10-02 14:58         ` Vladimir Sementsov-Ogievskiy [this message]
2018-10-02 15:21           ` Eric Blake
2018-10-02 11:33 ` [Qemu-devel] [PATCH 2/2] qapi: drop x- from x-block-latency-histogram-set Vladimir Sementsov-Ogievskiy
2018-10-02 13:11   ` Vladimir Sementsov-Ogievskiy
2018-10-02 14:25   ` Eric Blake

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=3c64931c-014a-3911-2ff8-4ac3cfef84b3@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=armbru@redhat.com \
    --cc=den@virtuozzo.com \
    --cc=eblake@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=nshirokovskiy@virtuozzo.com \
    --cc=qemu-block@nongnu.org \
    --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).