[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v3 19/21] macio: Account for failed operations
From: |
Alberto Garcia |
Subject: |
[Qemu-block] [PATCH v3 19/21] macio: Account for failed operations |
Date: |
Thu, 22 Oct 2015 11:11:29 +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.6.1
- [Qemu-block] [PATCH v3 21/21] block: Update copyright of the accounting code, (continued)
- [Qemu-block] [PATCH v3 21/21] block: Update copyright of the accounting code, Alberto Garcia, 2015/10/22
- [Qemu-block] [PATCH v3 14/21] nvme: Account for failed and invalid operations, Alberto Garcia, 2015/10/22
- [Qemu-block] [PATCH v3 20/21] scsi-disk: Account for failed operations, Alberto Garcia, 2015/10/22
- [Qemu-block] [PATCH v3 17/21] atapi: Account for failed and invalid operations, Alberto Garcia, 2015/10/22
- [Qemu-block] [PATCH v3 11/21] qemu-io: Account for failed, invalid and flush operations, Alberto Garcia, 2015/10/22
- [Qemu-block] [PATCH v3 16/21] xen_disk: Account for failed and invalid operations, Alberto Garcia, 2015/10/22
- [Qemu-block] [PATCH v3 13/21] iotests: Add test for the block device statistics, Alberto Garcia, 2015/10/22
- [Qemu-block] [PATCH v3 12/21] block: Use QEMU_CLOCK_VIRTUAL for the accounting code in qtest mode, Alberto Garcia, 2015/10/22
- [Qemu-block] [PATCH v3 15/21] virtio-blk: Account for failed and invalid operations, Alberto Garcia, 2015/10/22
- [Qemu-block] [PATCH v3 18/21] ide: Account for failed and invalid operations, Alberto Garcia, 2015/10/22
- [Qemu-block] [PATCH v3 19/21] macio: Account for failed operations,
Alberto Garcia <=
- [Qemu-block] [PATCH v3 10/21] block: New option to define the intervals for collecting I/O statistics, Alberto Garcia, 2015/10/22
- Re: [Qemu-block] [PATCH v3 00/21] Extended I/O accounting, Stefan Hajnoczi, 2015/10/23