From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WL84L-0004Zf-2S for qemu-devel@nongnu.org; Wed, 05 Mar 2014 04:25:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WL84D-0000On-JD for qemu-devel@nongnu.org; Wed, 05 Mar 2014 04:24:52 -0500 Received: from cantor2.suse.de ([195.135.220.15]:46598 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WL84D-0000OW-Dp for qemu-devel@nongnu.org; Wed, 05 Mar 2014 04:24:45 -0500 Message-ID: <5316ED59.8010400@suse.de> Date: Wed, 05 Mar 2014 10:24:41 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1393969512-9468-1-git-send-email-stefanha@redhat.com> <5316DCD3.3000306@redhat.com> In-Reply-To: <5316DCD3.3000306@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/4] qom: link property fixes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Peter Maydell , Anthony Liguori Am 05.03.2014 09:14, schrieb Paolo Bonzini: > Il 04/03/2014 22:45, Stefan Hajnoczi ha scritto: >> There are two problems with QOM link properties: >> >> 1. There are refcount leaks in many object_property_add_link() callers= . >> 2. There is no way to prevent link properties from being set after a >> device is >> realized. >> >> This patch series fixes these issues by extending the >> object_property_add_link() function. >=20 > Thanks for looking into this! Just two (mostly) cosmetic comments: >=20 > 1) in patch 2 we could use a flags argument instead of a "bool". This > is more easily extensible and self-documenting. I wonder if we can do this more cleverly: The two ways a link<> property can get set that I can think of are either a) assigning the field a new value in C code or b) using object_property_set_link() with a textual path. Can't the latter simply save an unref flag within the property's opaque when used? Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg