qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Amos Kong <kongjianjun@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	fromani@redhat.com, qemu-devel <qemu-devel@nongnu.org>,
	qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] block: allow write-threshold on device name
Date: Mon, 08 Jun 2015 08:35:21 -0600	[thread overview]
Message-ID: <5575A829.9010505@redhat.com> (raw)
In-Reply-To: <CAFeW=pbwdVso_Z3Pps3v5=bg9CaKva8iZZxmFk_qK5ZMkRjQsQ@mail.gmail.com>

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

On 06/07/2015 02:53 AM, Amos Kong wrote:
> On Sun, Jun 7, 2015 at 9:38 AM, Eric Blake <eblake@redhat.com> wrote:
>>
>> Commit e2462113 allowed the ability to fire an event if a BDS
>> node exceeds a threshold during a write, but limited the option
>> to only work on node names.  For convenience, expand this to
>> allow a device name as a way to set the threshold on the BDS
>> at the active layer of the device.
>>
>> Signed-off-by: Eric Blake <eblake@redhat.com>
>> ---
>>  block/write-threshold.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>

>> -    bs = bdrv_find_node(node_name);
>> +    bs = bdrv_lookup_bs(node_name, node_name, errp);
> 
> It means we can pass device name by 'node_name' parameter?

Yes. The two namespaces cannot overlap, so it is unambiguous that a
device name means the active node attached to the device (we use it in a
number of other commands).

> do we need to update command doc in qapi/block-core.json?

Good call; existing docs state:

# @block-set-write-threshold
...
# @node-name: graph node name on which the threshold must be set.
...
{ 'command': 'block-set-write-threshold',
  'data': { 'node-name': 'str', 'write-threshold': 'uint64' } }

so I'll prepare a v2 that tweaks it.

-- 
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 --]

  reply	other threads:[~2015-06-08 14:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-07  1:38 [Qemu-devel] [PATCH] block: allow write-threshold on device name Eric Blake
2015-06-07  8:53 ` Amos Kong
2015-06-08 14:35   ` Eric Blake [this message]
2015-06-09 22:35 ` Eric Blake
2015-06-10  7:57   ` Kevin Wolf
2015-06-10 13:07     ` Eric Blake
2015-06-10 13:43       ` Kevin Wolf
2015-06-10 14:53         ` 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=5575A829.9010505@redhat.com \
    --to=eblake@redhat.com \
    --cc=fromani@redhat.com \
    --cc=kongjianjun@gmail.com \
    --cc=kwolf@redhat.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).