diff options
author | Sam Li <faithilikerun@gmail.com> | 2023-05-08 13:19:14 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2023-05-15 08:18:10 -0400 |
commit | 52eb76f4b1ac040208275665b03da1fbee99c539 (patch) | |
tree | 15d50595f7ce61b7875d79fea847c70c78a45411 /hw | |
parent | 4f7366506a96c862c796d4ea1913110d9c341e7d (diff) | |
download | qemu-52eb76f4b1ac040208275665b03da1fbee99c539.zip qemu-52eb76f4b1ac040208275665b03da1fbee99c539.tar.gz qemu-52eb76f4b1ac040208275665b03da1fbee99c539.tar.bz2 |
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 <faithilikerun@gmail.com>
Message-id: 20230508051916.178322-3-faithilikerun@gmail.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block/virtio-blk.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index cb741de..bf05251 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; |