On Mon, 21 Oct 2013 10:15:59 +0800 Wenchao Xia <xiaw...@linux.vnet.ibm.com> wrote:
> This series move the event define to qapi code, so later other components > could use it easily, it also make monitor code less and easier to decouple > with other code. Yes, this is an improvement over the current code. But it doesn't move in the direction we (or better Anthony) originally had for events in the QAPI. Basically, *iirc*, the idea was to have an event type, so that we could declare events as: { 'event': 'BLOCK_IO_ERROR', 'data': { 'device': 'str', 'operation': 'str', 'action': 'str' } } (Note that keys 'operation' and 'action' should be enums) Then the QAPI could generate C functions to register and de-register from an event. This way C code could benefit from events too, and we could also allow QMP clients to register/de-register to/from events. Maybe we could apply this series as a first step, but I can't tell if later on we'll regret it due to compatibility issues or if we'll realize it was unneeded churn.