[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 16/22] virtio-blk: Account for failed and invalid
From: |
Alberto Garcia |
Subject: |
[Qemu-devel] [PATCH v2 16/22] virtio-blk: Account for failed and invalid operations |
Date: |
Fri, 2 Oct 2015 17:26:26 +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 f9301ae..9c5cb67 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.5.3
- [Qemu-devel] [PATCH v2 00/22] Extended I/O accounting, Alberto Garcia, 2015/10/08
- [Qemu-devel] [PATCH v2 16/22] virtio-blk: Account for failed and invalid operations,
Alberto Garcia <=
- [Qemu-devel] [PATCH v2 01/22] xen_disk: Account for flush operations, Alberto Garcia, 2015/10/08
- [Qemu-devel] [PATCH v2 04/22] util: Infrastructure for computing recent averages, Alberto Garcia, 2015/10/08
- [Qemu-devel] [PATCH v2 22/22] block: Update copyright of the accounting code, Alberto Garcia, 2015/10/08
- [Qemu-devel] [PATCH v2 05/22] block: Add idle_time_ns to BlockDeviceStats, Alberto Garcia, 2015/10/08
- [Qemu-devel] [PATCH v2 06/22] block: Add "supports_stats" field to BlockStats, Alberto Garcia, 2015/10/08