[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/55] ide: stash aiocb for flushes
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 04/55] ide: stash aiocb for flushes |
Date: |
Fri, 15 Aug 2014 18:06:11 +0100 |
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>
Signed-off-by: Stefan Hajnoczi <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 db191a6..79985f9 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -831,6 +831,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)) {
@@ -853,7 +855,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] [PULL 00/55] Block patches, Stefan Hajnoczi, 2014/08/15
- [Qemu-devel] [PULL 01/55] blkdebug: report errors on flush too, Stefan Hajnoczi, 2014/08/15
- [Qemu-devel] [PULL 02/55] libqtest: add QTEST_LOG for debugging qtest testcases, Stefan Hajnoczi, 2014/08/15
- [Qemu-devel] [PULL 03/55] ide-test: add test for werror=stop, Stefan Hajnoczi, 2014/08/15
- [Qemu-devel] [PULL 04/55] ide: stash aiocb for flushes,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 05/55] ide: simplify reset callbacks, Stefan Hajnoczi, 2014/08/15
- [Qemu-devel] [PULL 06/55] ide: simplify set_inactive callbacks, Stefan Hajnoczi, 2014/08/15
- [Qemu-devel] [PULL 08/55] ide: simplify start_transfer callbacks, Stefan Hajnoczi, 2014/08/15
- [Qemu-devel] [PULL 07/55] ide: simplify async_cmd_done callbacks, Stefan Hajnoczi, 2014/08/15
- [Qemu-devel] [PULL 09/55] ide: wrap start_dma callback, Stefan Hajnoczi, 2014/08/15
- [Qemu-devel] [PULL 11/55] ide: fold add_status callback into set_inactive, Stefan Hajnoczi, 2014/08/15
- [Qemu-devel] [PULL 10/55] ide: remove wrong setting of BM_STATUS_INT, Stefan Hajnoczi, 2014/08/15
- [Qemu-devel] [PULL 12/55] ide: move BM_STATUS bits to pci.[ch], Stefan Hajnoczi, 2014/08/15
- [Qemu-devel] [PULL 13/55] ide: move retry constants out of BM_STATUS_* namespace, Stefan Hajnoczi, 2014/08/15
- [Qemu-devel] [PULL 14/55] ahci: remove duplicate PORT_IRQ_* constants, Stefan Hajnoczi, 2014/08/15