diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2011-12-22 13:17:02 +0000 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-01-26 14:49:18 +0100 |
commit | 81b6b9faef111f4493addc2ed19903feace332bf (patch) | |
tree | bedffd6f10bc4579efd738e53909ce444b69e9e9 /hw/virtio-blk.c | |
parent | 094f1ba10ab341b8d1306e863698a07b2afa6b09 (diff) |
virtio-blk: add virtio_blk_handle_read trace event
There already exists a virtio_blk_handle_write trace event as well as
completion events. Add the virtio_blk_handle_read event so it's easy to
trace virtio-blk requests for both read and write operations.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/virtio-blk.c')
-rw-r--r-- | hw/virtio-blk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 5b416c36ee..a5a439668b 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -346,6 +346,8 @@ static void virtio_blk_handle_read(VirtIOBlockReq *req) bdrv_acct_start(req->dev->bs, &req->acct, req->qiov.size, BDRV_ACCT_READ); + trace_virtio_blk_handle_read(req, sector, req->qiov.size / 512); + if (sector & req->dev->sector_mask) { virtio_blk_rw_complete(req, -EIO); return; |