diff options
author | Eric Blake <eblake@redhat.com> | 2017-10-05 14:02:46 -0500 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-10-06 16:28:58 +0200 |
commit | d855ebcd3cca4080a81aeec9c0a27af006734280 (patch) | |
tree | 09118affc256052bc8504ac07d945ccd2055aa97 /block | |
parent | 8803714b53243816e96a759de3cfd22625230023 (diff) | |
download | qemu-d855ebcd3cca4080a81aeec9c0a27af006734280.zip qemu-d855ebcd3cca4080a81aeec9c0a27af006734280.tar.gz qemu-d855ebcd3cca4080a81aeec9c0a27af006734280.tar.bz2 |
block: Add blkdebug hook for copy-on-read
Make it possible to inject errors on writes performed during a
read operation due to copy-on-read semantics.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/io.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -983,6 +983,7 @@ static int coroutine_fn bdrv_co_do_copy_on_readv(BdrvChild *child, goto err; } + bdrv_debug_event(bs, BLKDBG_COR_WRITE); if (drv->bdrv_co_pwrite_zeroes && buffer_is_zero(bounce_buffer, iov.iov_len)) { /* FIXME: Should we (perhaps conditionally) be setting |