On 01/31/2012 01:46 AM, Paolo Bonzini wrote:
On 01/30/2012 10:08 PM, Anthony Liguori wrote:
This is mostly code movement although not entirely. This makes properties part
of the Object base class which means that we can now start using Object in a
meaningful way outside of qdev.

Can we move them to an intermediate base class? I would like to use QOM
refcounting for other objects, such as SCSIRequest, so it is important to have
Object as a pretty light-weight class. Also (and perhaps more importantly),
interface implementations are Objects too and they do not need properties.

I cannot think of any better name than IntrospectableObject, which is quite a
mouthful. I suppose that we could have the base class but still pass the objects
to the function as Object * and use the OBJECT macro. Nothing of this is in a
hot path anyway.

I'm just not sure how I feel about this.

The overhead of properties are small in terms of object size. It's just sizeof(void *).

I think that read-only properties could be interesting for SCSIRequest. For instance, I can imagine having SCSIRequest is-a BlockRequest and having an error property associated with it. That would provide a nice way to have an info io operation that returned a list of failed I/O requests or something like that.

Regards,

Anthony Liguori


Paolo



Reply via email to