[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/36] block/backup: improve comment about image fleecing
From: |
Max Reitz |
Subject: |
[PULL 09/36] block/backup: improve comment about image fleecing |
Date: |
Thu, 10 Oct 2019 13:42:33 +0200 |
From: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
---
block/backup.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index 98d7f7a905..ae28849660 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -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) |
--
2.21.0
- [PULL 00/36] Block patches, Max Reitz, 2019/10/10
- [PULL 02/36] block: introduce aio task pool, Max Reitz, 2019/10/10
- [PULL 01/36] qemu-iotests: ignore leaks on failure paths in 026, Max Reitz, 2019/10/10
- [PULL 03/36] block/qcow2: refactor qcow2_co_preadv_part, Max Reitz, 2019/10/10
- [PULL 04/36] block/qcow2: refactor qcow2_co_pwritev_part, Max Reitz, 2019/10/10
- [PULL 05/36] block/qcow2: introduce parallel subrequest handling in read and write, Max Reitz, 2019/10/10
- [PULL 06/36] block/backup: fix max_transfer handling for copy_range, Max Reitz, 2019/10/10
- [PULL 07/36] block/backup: fix backup_cow_with_offload for last cluster, Max Reitz, 2019/10/10
- [PULL 08/36] block/backup: split shareable copying part from backup_do_cow, Max Reitz, 2019/10/10
- [PULL 09/36] block/backup: improve comment about image fleecing,
Max Reitz <=
- [PULL 11/36] block/backup: fix block-comment style, Max Reitz, 2019/10/10
- [PULL 10/36] block/backup: introduce BlockCopyState, Max Reitz, 2019/10/10
- [PULL 12/36] block: move block_copy from block/backup.c to separate file, Max Reitz, 2019/10/10
- [PULL 13/36] block: teach bdrv_debug_breakpoint skip filters with backing, Max Reitz, 2019/10/10
- [PULL 15/36] iotests: 257: drop unused Drive.device field, Max Reitz, 2019/10/10
- [PULL 17/36] qapi: group BlockDeviceStats fields, Max Reitz, 2019/10/10
- [PULL 14/36] iotests: prepare 124 and 257 bitmap querying for backup-top filter, Max Reitz, 2019/10/10
- [PULL 16/36] iotests: 257: drop device_add, Max Reitz, 2019/10/10
- [PULL 18/36] qapi: add unmap to BlockDeviceStats, Max Reitz, 2019/10/10
- [PULL 19/36] block: add empty account cookie type, Max Reitz, 2019/10/10