megasas: Use bdrv_drain_all instead of qemu_aio_flush

Calling qemu_aio_flush() directly can hang when combined with I/O
throttling.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Kevin Wolf 2012-11-13 16:39:48 +01:00
parent b1649fae49
commit b618f4a1c1

View File

@ -1296,7 +1296,7 @@ static int megasas_dcmd_get_properties(MegasasState *s, MegasasCmd *cmd)
static int megasas_cache_flush(MegasasState *s, MegasasCmd *cmd)
{
qemu_aio_flush();
bdrv_drain_all();
return MFI_STAT_OK;
}