On Thu, 26 Mar 2015 21:33:19 +0100
Paolo Bonzini <pbonz...@redhat.com> wrote:

> 
> 
> On 26/03/2015 17:42, Igor Mammedov wrote:
> > +            mdevid = object_property_get_str(OBJECT(dimm->hostmem), "id",
> > +                                             &error_abort);
> > +            mdevpath = g_strdup_printf("/objects/%s", mdevid);
> > +            g_free(mdevid);
> > +            mdev = object_resolve_path_type(mdevpath, TYPE_MEMORY_BACKEND,
> > +                                            NULL);
> 
> You can add a backend with id xyz, remove it, and add another with the
> same id, right?
right, but in the end it compares pointers to hostmem so it safe.
but can_be_deleted() is more generic hence more preferred.

> 
> I think the can_be_deleted solution is better and not more invasive,
> even for 2.3.
> 
> Paolo
> 


Reply via email to