Received: from eggs.gnu.org ([2001:4830:134:3::10]:54636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yb8cc-0003Pf-N6 for qemu-devel@nongnu.org; Thu, 26 Mar 2015 10:18:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yb8cZ-0003Ly-Cz for qemu-devel@nongnu.org; Thu, 26 Mar 2015 10:18:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yb8cZ-0003Lu-5h for qemu-devel@nongnu.org; Thu, 26 Mar 2015 10:18:55 -0400 Date: Thu, 26 Mar 2015 15:18:48 +0100 From: Igor Mammedov Message-ID: <20150326151848.3e3d553d@nial.brq.redhat.com> In-Reply-To: <55140B89.9080703@redhat.com> References: <1427105442-23484-1-git-send-email-lma@suse.com> <551001E3.3010304@redhat.com> <55101163.6050201@suse.de> <20150323143051.4cab2004@nial.brq.redhat.com> <5512D8A2.3030100@suse.com> <20150326110529.5f158af3@nial.brq.redhat.com> <5513DA5F.6060906@suse.de> <20150326112921.446ec973@nial.brq.redhat.com> <55140B89.9080703@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] object: Add can_be_deleted callback to TypeInfo and TypeImpl List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, peter.crosthwaite@xilinx.com, Andreas =?UTF-8?B?RsOkcmJlcg==?= , Lin Ma On Thu, 26 Mar 2015 14:37:13 +0100 Paolo Bonzini wrote: > > > On 26/03/2015 11:29, Igor Mammedov wrote: > > What value of ref, one would use to decide if deletion is possible? > > > > In generic case object can have ref > 1 but still be eligible for deleting > > via object-del. > > Right, for example devices are unparented with ref > 1. > > Still, it could be a sane default implementation. It doesn't even need > a function pointer until someone comes up with an object that has > different needs. Not in case of memory backend, its 'ref' in unused state is 2 since it contains at least one child, backend object is owner of MemoryRegion. > Paolo