aboutsummaryrefslogtreecommitdiff
path: root/block/io.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2017-08-04 11:50:36 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2017-08-07 09:39:35 +0100
commitf42cf447e2310e84e119b99f7f13c8dc7a6cf3d6 (patch)
tree941e401b34cb90ef071fc219da469d841ceafaba /block/io.c
parentac44ed2afb7c60255e989b163301479f5b4ecd04 (diff)
block: move trace probes into bdrv_co_preadv|pwritev
There are trace probes in bdrv_co_readv|writev, however, the block drivers are being gradually moved over to using the bdrv_co_preadv|pwritev functions instead. As a result some block drivers miss the current probes. Move the probes into bdrv_co_preadv|pwritev instead, so that they are triggered by more (all?) I/O code paths. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170804105036.11879-1-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/io.c')
-rw-r--r--block/io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/io.c b/block/io.c
index d9dc822173..26003814eb 100644
--- a/block/io.c
+++ b/block/io.c
@@ -1135,6 +1135,8 @@ int coroutine_fn bdrv_co_preadv(BdrvChild *child,
bool use_local_qiov = false;
int ret;
+ trace_bdrv_co_preadv(child->bs, offset, bytes, flags);
+
if (!drv) {
return -ENOMEDIUM;
}
@@ -1207,8 +1209,6 @@ static int coroutine_fn bdrv_co_do_readv(BdrvChild *child,
int coroutine_fn bdrv_co_readv(BdrvChild *child, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
- trace_bdrv_co_readv(child->bs, sector_num, nb_sectors);
-
return bdrv_co_do_readv(child, sector_num, nb_sectors, qiov, 0);
}
@@ -1526,6 +1526,8 @@ int coroutine_fn bdrv_co_pwritev(BdrvChild *child,
bool use_local_qiov = false;
int ret;
+ trace_bdrv_co_pwritev(child->bs, offset, bytes, flags);
+
if (!bs->drv) {
return -ENOMEDIUM;
}
@@ -1660,8 +1662,6 @@ static int coroutine_fn bdrv_co_do_writev(BdrvChild *child,
int coroutine_fn bdrv_co_writev(BdrvChild *child, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
- trace_bdrv_co_writev(child->bs, sector_num, nb_sectors);
-
return bdrv_co_do_writev(child, sector_num, nb_sectors, qiov, 0);
}