[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v2 3/3] xen-disk: use an IOThread per instance

From: Paul Durrant
Subject: Re: [Qemu-block] [PATCH v2 3/3] xen-disk: use an IOThread per instance
Date: Mon, 10 Jul 2017 12:11:27 +0000

> -----Original Message-----
> > > > +    object_unparent(OBJECT(blkdev->iothread));
> > >
> > > Shouldn't this be object_unref?
> > >
> >
> > I don't think so. I think this is required to undo what was done by calling
> object_property_add_child() on the root object.
> Right, so if object_property_add_child is not actually required, then
> you might be able to turn object_unparent into object_unref.
> Unfortunately I don't know enough about QOM to be able to tell which is
> the right way of doing things, but looking at
> hw/block/dataplane/virtio-blk.c, it would seem that only object_ref and
> object_unref are required?

I guess I can give it a try. I was working on the assumption that all objects 
were required to have a parent, but maybe that's not true. Can someone more 
familiar with QOM comment?



> > Looking at other code such as object_new_with_propv() it looks like the
> right thing to do is to call object_unref() after calling
> object_property_add_child() to drop the implicit ref taken by object_new()
> so I'd need to add the call in blk_alloc().

reply via email to

[Prev in Thread] Current Thread [Next in Thread]