[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/28] ide: stash aiocb for flushes
From: |
John Snow |
Subject: |
[Qemu-devel] [PATCH 04/28] ide: stash aiocb for flushes |
Date: |
Mon, 7 Jul 2014 14:17:45 -0400 |
From: Paolo Bonzini <address@hidden>
This ensures that operations are completed after a reset
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: John Snow <address@hidden>
---
hw/ide/core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 3a38f1e..506db88 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -803,6 +803,8 @@ static void ide_flush_cb(void *opaque, int ret)
{
IDEState *s = opaque;
+ s->pio_aiocb = NULL;
+
if (ret < 0) {
/* XXX: What sector number to set here? */
if (ide_handle_rw_error(s, -ret, BM_STATUS_RETRY_FLUSH)) {
@@ -825,7 +827,7 @@ void ide_flush_cache(IDEState *s)
s->status |= BUSY_STAT;
bdrv_acct_start(s->bs, &s->acct, 0, BDRV_ACCT_FLUSH);
- bdrv_aio_flush(s->bs, ide_flush_cb, s);
+ s->pio_aiocb = bdrv_aio_flush(s->bs, ide_flush_cb, s);
}
static void ide_cfata_metadata_inquiry(IDEState *s)
--
1.9.3
- [Qemu-devel] [PATCH 00/28] ahci refactoring to support ahci-test suite, John Snow, 2014/07/07
- [Qemu-devel] [PATCH 01/28] blkdebug: report errors on flush too, John Snow, 2014/07/07
- [Qemu-devel] [PATCH 02/28] libqtest: add QTEST_LOG for debugging qtest testcases, John Snow, 2014/07/07
- [Qemu-devel] [PATCH 03/28] ide-test: add test for werror=stop, John Snow, 2014/07/07
- [Qemu-devel] [PATCH 04/28] ide: stash aiocb for flushes,
John Snow <=
- [Qemu-devel] [PATCH 06/28] ide: simplify set_inactive callbacks, John Snow, 2014/07/07
- [Qemu-devel] [PATCH 07/28] ide: simplify async_cmd_done callbacks, John Snow, 2014/07/07
- [Qemu-devel] [PATCH 05/28] ide: simplify reset callbacks, John Snow, 2014/07/07
- [Qemu-devel] [PATCH 11/28] ide: fold add_status callback into set_inactive, John Snow, 2014/07/07
- [Qemu-devel] [PATCH 12/28] ide: move BM_STATUS bits to pci.[ch], John Snow, 2014/07/07