Re: [Qemu-devel] Re: KVM call minutes for June 8

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Anthony Liguori
Date: Tuesday, June 8, 2010 - 2:13 pm

On 06/08/2010 03:59 PM, Luiz Capitulino wrote:

Sometimes we have to make difficult changes and touch a lot of code.  
There's really no other way and we're just going to have to grit our 
teeth and do it.  Honestly, it's not that bad though having gone through 
much of the code at this point.


We're going to have to basically drop most of the QErrors we have today 
for 0.14 after we straighten out the error mess.

Errors are pretty easy to deprecate and replace.  All clients have to 
handle new types of errors so the worst thing that will happen is that 
they have less specific errors.

The big problem is things like the block io error events.  I don't see 
how we can support that given what we have in 0.13.  Putting errno on 
the wire is a bad idea.  We need to marshal a QError object using the 
__class__ memory to identify it as QError and pass that with the event.  
It could potentially be made to work for 0.13 but it'll be ugly.


But handler A and handler B have the context that they are A and B so 
they can display the error differently.  That's the whole point.

There should be a 1:1 mapping between QError and errno.  That's the 
problem with QErrors today.  Instead of ENOENT, we have BusNotFound, 
CommandNotFound, DeviceNotFound, FdNotFound, PropertyNotFound, and 
PropertyValueNotFound.

All we really need is a single ItemNotFound event that takes a 'context' 
and 'item' data.  A generic way to dump the error would be '%(context) 
named "%(item)" not found".  The advantage of QErrors over errno is that 
we can add a little bit more data to it to make error inspection a bit 
friendlier.  But regardless of that extra info, we should still be using 
the equivalent of just ENOENT, not EBUSNOENT, ECOMMANDNOENT, 
EDEVICENOENT, etc.

If you want to display more custom text, then you have to be able to 
inspect the QError object, get the info from it, and then decide based 
on the context the error was generated, how to display it.  The ability 
to work with QErrors in a meaningful way in handlers is keeping us from 
doing this today.

Regards,

Anthony Liguori


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
KVM call minutes for June 8, Chris Wright, (Tue Jun 8, 8:05 am)
Re: KVM call minutes for June 8, Anthony Liguori, (Tue Jun 8, 9:01 am)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Luiz Capitulino, (Tue Jun 8, 1:59 pm)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Anthony Liguori, (Tue Jun 8, 2:13 pm)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Luiz Capitulino, (Wed Jun 9, 8:18 am)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Daniel P. Berrange, (Wed Jun 9, 8:31 am)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Anthony Liguori, (Wed Jun 9, 9:22 am)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Anthony Liguori, (Wed Jun 9, 9:26 am)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Daniel P. Berrange, (Wed Jun 9, 9:29 am)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Kevin Wolf, (Thu Jun 10, 2:43 am)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Anthony Liguori, (Thu Jun 10, 5:53 am)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Kevin Wolf, (Thu Jun 10, 6:08 am)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Avi Kivity, (Thu Jun 10, 7:11 am)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Kevin Wolf, (Thu Jun 10, 7:22 am)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Anthony Liguori, (Thu Jun 10, 7:27 am)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Luiz Capitulino, (Fri Jun 11, 5:55 am)
Re: [Qemu-devel] Re: KVM call minutes for June 8, Anthony Liguori, (Fri Jun 11, 6:48 am)