[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 19/21] macio: Account for failed operations
From: |
Alberto Garcia |
Subject: |
[Qemu-devel] [PATCH v4 19/21] macio: Account for failed operations |
Date: |
Wed, 28 Oct 2015 17:33:16 +0200 |
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 893c9b9..3ee962f 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.6.1
- [Qemu-devel] [PATCH v4 16/21] xen_disk: Account for failed and invalid operations, (continued)
- [Qemu-devel] [PATCH v4 16/21] xen_disk: Account for failed and invalid operations, Alberto Garcia, 2015/10/28
- [Qemu-devel] [PATCH v4 08/21] block: Compute minimum, maximum and average I/O latencies, Alberto Garcia, 2015/10/28
- [Qemu-devel] [PATCH v4 15/21] virtio-blk: Account for failed and invalid operations, Alberto Garcia, 2015/10/28
- [Qemu-devel] [PATCH v4 21/21] block: Update copyright of the accounting code, Alberto Garcia, 2015/10/28
- [Qemu-devel] [PATCH v4 11/21] qemu-io: Account for failed, invalid and flush operations, Alberto Garcia, 2015/10/28
- [Qemu-devel] [PATCH v4 20/21] scsi-disk: Account for failed operations, Alberto Garcia, 2015/10/28
- [Qemu-devel] [PATCH v4 17/21] atapi: Account for failed and invalid operations, Alberto Garcia, 2015/10/28
- [Qemu-devel] [PATCH v4 13/21] iotests: Add test for the block device statistics, Alberto Garcia, 2015/10/28
- [Qemu-devel] [PATCH v4 14/21] nvme: Account for failed and invalid operations, Alberto Garcia, 2015/10/28
- [Qemu-devel] [PATCH v4 18/21] ide: Account for failed and invalid operations, Alberto Garcia, 2015/10/28
- [Qemu-devel] [PATCH v4 19/21] macio: Account for failed operations,
Alberto Garcia <=
- [Qemu-devel] [PATCH v4 12/21] block: Use QEMU_CLOCK_VIRTUAL for the accounting code in qtest mode, Alberto Garcia, 2015/10/28
- [Qemu-devel] [PATCH v4 10/21] block: New option to define the intervals for collecting I/O statistics, Alberto Garcia, 2015/10/28