close all the block drivers before the qemu process exits

This patch calls the close handler of the block driver before the qemu
process exits.

This is necessary because the sheepdog block driver releases the lock
of VM images in the close handler.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
MORITA Kazutaka 2010-05-28 11:44:57 +09:00 committed by Kevin Wolf
parent 08a00559f0
commit 2bc93fed76
3 changed files with 11 additions and 0 deletions

1
vl.c
View file

@ -1991,6 +1991,7 @@ static void main_loop(void)
vm_stop(r);
}
}
bdrv_close_all();
pause_all_vcpus();
}