mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
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
28de2dcd88
. 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>
This commit is contained in:
parent
67b51fb998
commit
09d2f94846
2 changed files with 40 additions and 2 deletions
|
@ -70,8 +70,20 @@ typedef enum {
|
|||
* content. */
|
||||
BDRV_REQ_WRITE_UNCHANGED = 0x40,
|
||||
|
||||
/*
|
||||
* BDRV_REQ_SERIALISING forces request serialisation for writes.
|
||||
* It is used to ensure that writes to the backing file of a backup process
|
||||
* target cannot race with a read of the backup target that defers to the
|
||||
* backing file.
|
||||
*
|
||||
* Note, that BDRV_REQ_SERIALISING is _not_ opposite in meaning to
|
||||
* BDRV_REQ_NO_SERIALISING. A more descriptive name for the latter might be
|
||||
* _DO_NOT_WAIT_FOR_SERIALISING, except that is too long.
|
||||
*/
|
||||
BDRV_REQ_SERIALISING = 0x80,
|
||||
|
||||
/* Mask of valid flags */
|
||||
BDRV_REQ_MASK = 0x7f,
|
||||
BDRV_REQ_MASK = 0xff,
|
||||
} BdrvRequestFlags;
|
||||
|
||||
typedef struct BlockSizes {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue