]> Git Repo - qemu.git/commitdiff
block/backup: improve comment about image fleecing
authorVladimir Sementsov-Ogievskiy <[email protected]>
Fri, 20 Sep 2019 14:20:45 +0000 (17:20 +0300)
committerMax Reitz <[email protected]>
Thu, 10 Oct 2019 08:56:17 +0000 (10:56 +0200)
Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Message-id: 20190920142056[email protected]
Signed-off-by: Max Reitz <[email protected]>
block/backup.c

index 98d7f7a90507f7392f73e1c056bb16c7feb99eb5..ae288496601221e093666c082a8e854ff1e4645c 100644 (file)
@@ -747,9 +747,18 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs,
     job->bitmap_mode = bitmap_mode;
 
     /*
-     * Set write flags:
-     * 1. Detect image-fleecing (and similar) schemes
-     * 2. Handle compression
+     * If source is in backing chain of target assume that target is going to be
+     * used for "image fleecing", i.e. it should represent a kind of snapshot of
+     * 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 =
         (bdrv_chain_contains(target, bs) ? BDRV_REQ_SERIALISING : 0) |
This page took 0.028523 seconds and 4 git commands to generate.