From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1y9H-0000Xt-PK for qemu-devel@nongnu.org; Mon, 08 Jun 2015 10:35:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1y9D-0007zE-MD for qemu-devel@nongnu.org; Mon, 08 Jun 2015 10:35:35 -0400 Message-ID: <5575A829.9010505@redhat.com> Date: Mon, 08 Jun 2015 08:35:21 -0600 From: Eric Blake MIME-Version: 1.0 References: <1433641131-24123-1-git-send-email-eblake@redhat.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nKnSvkQltvS2Rn7KMHSrmHGhBmSjT1ibb" Subject: Re: [Qemu-devel] [PATCH] block: allow write-threshold on device name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: Kevin Wolf , fromani@redhat.com, qemu-devel , qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --nKnSvkQltvS2Rn7KMHSrmHGhBmSjT1ibb Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/07/2015 02:53 AM, Amos Kong wrote: > On Sun, Jun 7, 2015 at 9:38 AM, Eric Blake 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 >> --- >> block/write-threshold.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) >> >> - bs =3D bdrv_find_node(node_name); >> + bs =3D bdrv_lookup_bs(node_name, node_name, errp); >=20 > It means we can pass device name by 'node_name' parameter=EF=BC=9F 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 =2E.. # @node-name: graph node name on which the threshold must be set. =2E.. { 'command': 'block-set-write-threshold', 'data': { 'node-name': 'str', 'write-threshold': 'uint64' } } so I'll prepare a v2 that tweaks it. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --nKnSvkQltvS2Rn7KMHSrmHGhBmSjT1ibb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVdagpAAoJEKeha0olJ0NqZEAIAKs3nyLfFJkwBMdH77ip4sjM 0vSvHueTnwPvB0fxKm9U2ZupmjUFyopXwEuGuq2wetA2+cB+fGQC2ZyzSwhkN2rk WE7W/lxBWImnjNsC97LVsQ5pB2wUZsXwwH+8ub8+NLx/0VEcbUVaVcTsy36VqoZH HAa773391Nh/s4zimE3oFCRersTZUN1wg0yRmbIf36p1AtZeTp3wabv0RweZSvHA fNRHsMuiRoUP2+eRpqNKSxClzRED9U6MJvLjeMIvbNqmXO4b4+ME2wzvbUsffLh4 cYPuILwq/EDdaB5xwTn/qICvVzmxdEhfXGPH3626Bp2TAmKDhGu5YL2kq8Re/Dg= =cLxJ -----END PGP SIGNATURE----- --nKnSvkQltvS2Rn7KMHSrmHGhBmSjT1ibb--