On 12.10.2011 23:35, Eric Blake wrote:
On 10/12/2011 05:59 AM, Michal Privoznik wrote:
> As this is needed. Although some functions check for domain
> being active before obtaining job, we need to check it after,
> because obtaining job unlocks domain object, during which
> a state of domain can be changed.
> ---
> src/qemu/qemu_driver.c | 75
> ++++++++++++++++++++++++++++++++++++++++++++----
> 1 files changed, 69 insertions(+), 6 deletions(-)
ACK. We've had patches like this in the past (commit 054d43f came to my
mind).
It might be nicer to someday refactor the code to move the burden into
the begin-job helper, instead of repeating it on all callers, but as
that is a bigger patch, and would cause more merge conflicts across
backports, I'm okay if it gets delayed until someone really has the time
and motivation to tackle that project.
Thanks, pushed.
I basically do agree, but we need to keep in mind that some APIs does
not need to check for domain being active, but in fact being not active
(e.g. create).