OSDN Git Service

block: add BDRV_REQ_SERIALISING flag
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Mon, 9 Jul 2018 16:37:18 +0000 (19:37 +0300)
committerKevin Wolf <kwolf@redhat.com>
Tue, 10 Jul 2018 11:10:25 +0000 (13:10 +0200)
commit09d2f948462f4979d18f573a0734d1daae8e67a9
treebe170c2bba1a5ea8561ab0708554203443bb6f0d
parent67b51fb998c697afb5d744066fcbde53e04fe941
block: add BDRV_REQ_SERIALISING flag

Serialized writes should be used in copy-on-write of backup(sync=none)
for image fleecing scheme.

We need to change an assert in bdrv_aligned_pwritev, added in
28de2dcd88de. The assert may fail now, because call to
wait_serialising_requests here may become first call to it for this
request with serializing flag set. It occurs if the request is aligned
(otherwise, we should already set serializing flag before calling
bdrv_aligned_pwritev and correspondingly waited for all intersecting
requests). However, for aligned requests, we should not care about
outdating of previously read data, as there no such data. Therefore,
let's just update an assert to not care about aligned requests.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/io.c
include/block/block.h