[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 15/21] virtio-blk: Account for failed and invalid
From: |
Alberto Garcia |
Subject: |
[Qemu-devel] [PATCH v3 15/21] virtio-blk: Account for failed and invalid operations |
Date: |
Thu, 22 Oct 2015 11:11:25 +0300 |
Signed-off-by: Alberto Garcia <address@hidden>
---
hw/block/virtio-blk.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 8beb26b..aea9728 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -76,7 +76,7 @@ static int virtio_blk_handle_rw_error(VirtIOBlockReq *req,
int error,
s->rq = req;
} else if (action == BLOCK_ERROR_ACTION_REPORT) {
virtio_blk_req_complete(req, VIRTIO_BLK_S_IOERR);
- block_acct_done(blk_get_stats(s->blk), &req->acct);
+ block_acct_failed(blk_get_stats(s->blk), &req->acct);
virtio_blk_free_request(req);
}
@@ -536,6 +536,8 @@ void virtio_blk_handle_request(VirtIOBlockReq *req,
MultiReqBuffer *mrb)
if (!virtio_blk_sect_range_ok(req->dev, req->sector_num,
req->qiov.size)) {
virtio_blk_req_complete(req, VIRTIO_BLK_S_IOERR);
+ block_acct_invalid(blk_get_stats(req->dev->blk),
+ is_write ? BLOCK_ACCT_WRITE : BLOCK_ACCT_READ);
virtio_blk_free_request(req);
return;
}
--
2.6.1
- [Qemu-devel] [PATCH v3 02/21] ide: Account for write operations correctly, (continued)
- [Qemu-devel] [PATCH v3 02/21] ide: Account for write operations correctly, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 03/21] block: define 'clock_type' for the accounting code, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 06/21] block: Add statistics for failed and invalid I/O operations, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 05/21] block: Add idle_time_ns to BlockDeviceStats, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 04/21] util: Infrastructure for computing recent averages, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 09/21] block: Add average I/O queue depth to BlockDeviceTimedStats, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 21/21] block: Update copyright of the accounting code, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 12/21] block: Use QEMU_CLOCK_VIRTUAL for the accounting code in qtest mode, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 15/21] virtio-blk: Account for failed and invalid operations,
Alberto Garcia <=
- [Qemu-devel] [PATCH v3 19/21] macio: Account for failed operations, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 14/21] nvme: Account for failed and invalid operations, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 18/21] ide: Account for failed and invalid operations, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 17/21] atapi: Account for failed and invalid operations, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 11/21] qemu-io: Account for failed, invalid and flush operations, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 20/21] scsi-disk: Account for failed operations, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 13/21] iotests: Add test for the block device statistics, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 16/21] xen_disk: Account for failed and invalid operations, Alberto Garcia, 2015/10/22
- [Qemu-devel] [PATCH v3 10/21] block: New option to define the intervals for collecting I/O statistics, Alberto Garcia, 2015/10/22
- Re: [Qemu-devel] [PATCH v3 00/21] Extended I/O accounting, Stefan Hajnoczi, 2015/10/23