]> git.proxmox.com Git - mirror_qemu.git/commit - block/blkdebug.c
blkdebug: process all set_state rules in the old state
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 28 Sep 2012 15:23:00 +0000 (17:23 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 28 Sep 2012 17:40:56 +0000 (19:40 +0200)
commit8f96b5be92fbd74798b97b1dc1ff5fbbe249ed11
tree983157d264be8b848640e98970d610fdaae752d2
parent1d809098aa9518cda41c2cf6e660d3d602614907
blkdebug: process all set_state rules in the old state

Currently it is impossible to write a blkdebug script that ping-pongs
between two states, because the second set-state rule will use the
state that is set in the first.  If you have

    [set-state]
    event = "..."
    state = "1"
    new_state = "2"

    [set-state]
    event = "..."
    state = "2"
    new_state = "1"

for example the state will remain locked at 1.  This can be fixed
by first processing all rules, and then setting the state.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/blkdebug.c