From 52eb76f4b1ac040208275665b03da1fbee99c539 Mon Sep 17 00:00:00 2001 From: Sam Li Date: Mon, 8 May 2023 13:19:14 +0800 Subject: block: add accounting for zone append operation Taking account of the new zone append write operation for zoned devices, BLOCK_ACCT_ZONE_APPEND enum is introduced as other I/O request type (read, write, flush). Signed-off-by: Sam Li Message-id: 20230508051916.178322-3-faithilikerun@gmail.com Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hw/block') diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index cb741dec39..bf05251a75 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -919,6 +919,10 @@ static int virtio_blk_handle_zone_append(VirtIOBlockReq *req, data->in_num = in_num; data->zone_append_data.offset = offset; qemu_iovec_init_external(&req->qiov, out_iov, out_num); + + block_acct_start(blk_get_stats(s->blk), &req->acct, len, + BLOCK_ACCT_ZONE_APPEND); + blk_aio_zone_append(s->blk, &data->zone_append_data.offset, &req->qiov, 0, virtio_blk_zone_append_complete, data); return 0; -- cgit v1.2.3