diff options
author | Fam Zheng <famz@redhat.com> | 2018-07-03 10:37:57 +0800 |
---|---|---|
committer | Jeff Cody <jcody@redhat.com> | 2018-07-02 23:23:45 -0400 |
commit | dee12de89380483656072f775f5ef99f4426f966 (patch) | |
tree | f7bcaa73fa272afc1109452895a011897a0627d2 /block/io.c | |
parent | d4d3e5a0d53a57282955e8a3ed7acc1ca90552d9 (diff) |
block: Honour BDRV_REQ_NO_SERIALISING in copy range
This semantics is needed by drive-backup so implement it before using
this API there.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 20180703023758.14422-3-famz@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
Diffstat (limited to 'block/io.c')
-rw-r--r-- | block/io.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/block/io.c b/block/io.c index b8845708d7..1a2272fad3 100644 --- a/block/io.c +++ b/block/io.c @@ -2930,8 +2930,10 @@ static int coroutine_fn bdrv_co_copy_range_internal(BdrvChild *src, tracked_request_begin(&dst_req, dst->bs, dst_offset, bytes, BDRV_TRACKED_WRITE); - wait_serialising_requests(&src_req); - wait_serialising_requests(&dst_req); + if (!(flags & BDRV_REQ_NO_SERIALISING)) { + wait_serialising_requests(&src_req); + wait_serialising_requests(&dst_req); + } if (recurse_src) { ret = src->bs->drv->bdrv_co_copy_range_from(src->bs, src, src_offset, |