block/backup: improve comment about image fleecing
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 20190920142056.12778-5-vsementsov@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
0bd0c44372
commit
372c67ea61
@ -747,9 +747,18 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs,
|
|||||||
job->bitmap_mode = bitmap_mode;
|
job->bitmap_mode = bitmap_mode;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set write flags:
|
* If source is in backing chain of target assume that target is going to be
|
||||||
* 1. Detect image-fleecing (and similar) schemes
|
* used for "image fleecing", i.e. it should represent a kind of snapshot of
|
||||||
* 2. Handle compression
|
* source at backup-start point in time. And target is going to be read by
|
||||||
|
* somebody (for example, used as NBD export) during backup job.
|
||||||
|
*
|
||||||
|
* In this case, we need to add BDRV_REQ_SERIALISING write flag to avoid
|
||||||
|
* intersection of backup writes and third party reads from target,
|
||||||
|
* otherwise reading from target we may occasionally read already updated by
|
||||||
|
* guest data.
|
||||||
|
*
|
||||||
|
* For more information see commit f8d59dfb40bb and test
|
||||||
|
* tests/qemu-iotests/222
|
||||||
*/
|
*/
|
||||||
job->write_flags =
|
job->write_flags =
|
||||||
(bdrv_chain_contains(target, bs) ? BDRV_REQ_SERIALISING : 0) |
|
(bdrv_chain_contains(target, bs) ? BDRV_REQ_SERIALISING : 0) |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user