[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v2 20/22] macio: Account for failed operations
From: |
Alberto Garcia |
Subject: |
[Qemu-block] [PATCH v2 20/22] macio: Account for failed operations |
Date: |
Fri, 2 Oct 2015 17:26:30 +0300 |
Signed-off-by: Alberto Garcia <address@hidden>
---
hw/ide/macio.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/hw/ide/macio.c b/hw/ide/macio.c
index 66ac2ba..176e331 100644
--- a/hw/ide/macio.c
+++ b/hw/ide/macio.c
@@ -286,7 +286,11 @@ static void pmac_ide_atapi_transfer_cb(void *opaque, int
ret)
return;
done:
- block_acct_done(blk_get_stats(s->blk), &s->acct);
+ if (ret < 0) {
+ block_acct_failed(blk_get_stats(s->blk), &s->acct);
+ } else {
+ block_acct_done(blk_get_stats(s->blk), &s->acct);
+ }
io->dma_end(opaque);
return;
@@ -348,7 +352,11 @@ static void pmac_ide_transfer_cb(void *opaque, int ret)
done:
if (s->dma_cmd == IDE_DMA_READ || s->dma_cmd == IDE_DMA_WRITE) {
- block_acct_done(blk_get_stats(s->blk), &s->acct);
+ if (ret < 0) {
+ block_acct_failed(blk_get_stats(s->blk), &s->acct);
+ } else {
+ block_acct_done(blk_get_stats(s->blk), &s->acct);
+ }
}
io->dma_end(opaque);
}
--
2.5.3
- [Qemu-block] [PATCH v2 16/22] virtio-blk: Account for failed and invalid operations, (continued)
- [Qemu-block] [PATCH v2 16/22] virtio-blk: Account for failed and invalid operations, Alberto Garcia, 2015/10/08
- [Qemu-block] [PATCH v2 12/22] qemu-io: Account for failed, invalid and flush operations, Alberto Garcia, 2015/10/08
- [Qemu-block] [PATCH v2 05/22] block: Add idle_time_ns to BlockDeviceStats, Alberto Garcia, 2015/10/08
- [Qemu-block] [PATCH v2 08/22] block: Allow configuring whether to account failed and invalid ops, Alberto Garcia, 2015/10/08
- [Qemu-block] [PATCH v2 10/22] block: Add average I/O queue depth to BlockDeviceTimedStats, Alberto Garcia, 2015/10/08
- [Qemu-block] [PATCH v2 03/22] block: define 'clock_type' for the accounting code, Alberto Garcia, 2015/10/08
- [Qemu-block] [PATCH v2 14/22] iotests: Add test for the block device statistics, Alberto Garcia, 2015/10/08
- [Qemu-block] [PATCH v2 20/22] macio: Account for failed operations,
Alberto Garcia <=
- [Qemu-block] [PATCH v2 13/22] block: Use QEMU_CLOCK_VIRTUAL for the accounting code in qtest mode, Alberto Garcia, 2015/10/08