block: Decouple block device "commit all" from DriveInfo

do_commit() and mux_proc_byte() iterate over the list of drives
defined with drive_init().  This misses host block devices defined by
other means.  Such means don't exist now, but will be introduced later
in this series.

Change them to use new bdrv_commit_all(), which iterates over all host
block devices.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Markus Armbruster
2010-06-02 18:55:18 +02:00
committed by Kevin Wolf
parent abd7f68d08
commit 6ab4b5ab8f
4 changed files with 19 additions and 14 deletions

View File

@@ -351,12 +351,7 @@ static int mux_proc_byte(CharDriverState *chr, MuxDriver *d, int ch)
break;
}
case 's':
{
DriveInfo *dinfo;
QTAILQ_FOREACH(dinfo, &drives, next) {
bdrv_commit(dinfo->bdrv);
}
}
bdrv_commit_all();
break;
case 'b':
qemu_chr_event(chr, CHR_EVENT_BREAK);