[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v4 01/21] xen_disk: Account for flush operations
From: |
Alberto Garcia |
Subject: |
[Qemu-block] [PATCH v4 01/21] xen_disk: Account for flush operations |
Date: |
Wed, 28 Oct 2015 17:32:58 +0200 |
Currently both BLKIF_OP_WRITE and BLKIF_OP_FLUSH_DISKCACHE are being
accounted as write operations.
Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
---
hw/block/xen_disk.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index 1bbc111..4869518 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -576,7 +576,9 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq)
}
block_acct_start(blk_get_stats(blkdev->blk), &ioreq->acct,
- ioreq->v.size, BLOCK_ACCT_WRITE);
+ ioreq->v.size,
+ ioreq->req.operation == BLKIF_OP_WRITE ?
+ BLOCK_ACCT_WRITE : BLOCK_ACCT_FLUSH);
ioreq->aio_inflight++;
blk_aio_writev(blkdev->blk, ioreq->start / BLOCK_SIZE,
&ioreq->v, ioreq->v.size / BLOCK_SIZE,
--
2.6.1
- [Qemu-block] [PATCH v4 00/21] Extended I/O accounting, Alberto Garcia, 2015/10/28
- [Qemu-block] [PATCH v4 02/21] ide: Account for write operations correctly, Alberto Garcia, 2015/10/28
- [Qemu-block] [PATCH v4 05/21] block: Add idle_time_ns to BlockDeviceStats, Alberto Garcia, 2015/10/28
- [Qemu-block] [PATCH v4 01/21] xen_disk: Account for flush operations,
Alberto Garcia <=
- [Qemu-block] [PATCH v4 06/21] block: Add statistics for failed and invalid I/O operations, Alberto Garcia, 2015/10/28
- [Qemu-block] [PATCH v4 09/21] block: Add average I/O queue depth to BlockDeviceTimedStats, Alberto Garcia, 2015/10/28
- [Qemu-block] [PATCH v4 04/21] util: Infrastructure for computing recent averages, Alberto Garcia, 2015/10/28
- [Qemu-block] [PATCH v4 03/21] block: define 'clock_type' for the accounting code, Alberto Garcia, 2015/10/28
- [Qemu-block] [PATCH v4 16/21] xen_disk: Account for failed and invalid operations, Alberto Garcia, 2015/10/28
- [Qemu-block] [PATCH v4 11/21] qemu-io: Account for failed, invalid and flush operations, Alberto Garcia, 2015/10/28
- [Qemu-block] [PATCH v4 07/21] block: Allow configuring whether to account failed and invalid ops, Alberto Garcia, 2015/10/28
- [Qemu-block] [PATCH v4 08/21] block: Compute minimum, maximum and average I/O latencies, Alberto Garcia, 2015/10/28
- [Qemu-block] [PATCH v4 21/21] block: Update copyright of the accounting code, Alberto Garcia, 2015/10/28
- [Qemu-block] [PATCH v4 18/21] ide: Account for failed and invalid operations, Alberto Garcia, 2015/10/28