Block patches
The following changes since commit 61c265f0660ee476985808c8aa7915617c44fd53:
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20200313a' into staging (2020-03-13 10:33:04 +0000)
are available in the Git repository at:
https://github.com/stefanha/qemu.git tags/block-pull-request
for you to fetch changes up to 4ab78b19189a81038e744728ed949d09aa477550:
block/io: fix bdrv_co_do_copy_on_readv (2020-03-16 11:46:11 +0000)
----------------------------------------------------------------
Pull request
----------------------------------------------------------------
Vladimir Sementsov-Ogievskiy (1):
block/io: fix bdrv_co_do_copy_on_readv
block/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.24.1
[PULL 1/1] block/io: fix bdrv_co_do_copy_on_readv
From: Vladimir Sementsov-Ogievskiy <[email protected]>
Prior to 1143ec5ebf4 it was OK to qemu_iovec_from_buf() from aligned-up buffer to original qiov, as qemu_iovec_from_buf() will stop at qiov end anyway.
But after 1143ec5ebf4 we assume that bdrv_co_do_copy_on_readv works on part of original qiov, defined by qiov_offset and bytes. So we must not touch qiov behind qiov_offset+bytes bound. Fix it.
Message-id: [email protected]
--- block/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/io.c +1 -1
@@ -1399,7 +1399,7 @@ static int coroutine_fn bdrv_co_do_copy_on_readv(BdrvChild *child,if (!(flags &BDRV_REQ_PREFETCH )) {qemu_iovec_from_buf (qiov, qiov_offset + progress, bounce_buffer + skip_bytes, - pnum - skip_bytes); +MIN (pnum - skip_bytes, bytes - progress)); } }else if (!(flags &BDRV_REQ_PREFETCH )) {/* Read directly into the destination */
Signature · 1 line
2.24.1
Peter Maydell
AppliedQuoted 9 lines · Stefan Hajnoczi
The following changes since commit
61c265f0660ee476985808c8aa7915617c44fd53:Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20200313a' into staging (2020-03-13 10:33:04 +0000)
are available in the Git repository at:
https://github.com/stefanha/qemu.git tags/block-pull-request
Quoted 8 lines
for you to fetch changes up to
4ab78b19189a81038e744728ed949d09aa477550:block/io: fix
bdrv_co_do_copy_on_readv(2020-03-16 11:46:11 +0000)----------------------------------------------------------------
Pull request----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.
-- PMM