]> Git Repo - qemu.git/commit - block/io.c
block/io: fix copy_range
authorVladimir Sementsov-Ogievskiy <[email protected]>
Mon, 9 Jul 2018 16:37:16 +0000 (19:37 +0300)
committerKevin Wolf <[email protected]>
Tue, 10 Jul 2018 11:04:22 +0000 (13:04 +0200)
commit999658a05e61a8d87b65827da665302bb44ce8c9
tree25e3fa25f83c869ae808cb081bc2570723893f2e
parente79c4cd1909c05a2cab6517a9c00445bd2d880a6
block/io: fix copy_range

Here two things are fixed:

1. Architecture

On each recursion step, we go to the child of src or dst, only for one
of them. So, it's wrong to create tracked requests for both on each
step. It leads to tracked requests duplication.

2. Wait for serializing requests on write path independently of
   BDRV_REQ_NO_SERIALISING

Before commit 9ded4a01149 "backup: Use copy offloading",
BDRV_REQ_NO_SERIALISING was used for only one case: read in
copy-on-write operation during backup. Also, the flag was handled only
on read path (in bdrv_co_preadv and bdrv_aligned_preadv).

After 9ded4a01149, flag is used for not waiting serializing operations
on backup target (in same case of copy-on-write operation). This
behavior change is unsubstantiated and potentially dangerous, let's
drop it and add additional asserts and documentation.

Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/io.c
include/block/block.h
This page took 0.024143 seconds and 4 git commands to generate.