[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v13 04/15] block/backup: improve comment about image fleecing
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v13 04/15] block/backup: improve comment about image fleecing |
Date: |
Fri, 20 Sep 2019 17:20:45 +0300 |
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-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
- [PATCH v13 00/15] backup-top filter driver for backup, Vladimir Sementsov-Ogievskiy, 2019/09/20
- [PATCH v13 01/15] block/backup: fix max_transfer handling for copy_range, Vladimir Sementsov-Ogievskiy, 2019/09/20
- [PATCH v13 03/15] block/backup: split shareable copying part from backup_do_cow, Vladimir Sementsov-Ogievskiy, 2019/09/20
- [PATCH v13 13/15] block: add lock/unlock range functions, Vladimir Sementsov-Ogievskiy, 2019/09/20
- [PATCH v13 06/15] block/backup: fix block-comment style, Vladimir Sementsov-Ogievskiy, 2019/09/20
- [PATCH v13 02/15] block/backup: fix backup_cow_with_offload for last cluster, Vladimir Sementsov-Ogievskiy, 2019/09/20
- [PATCH v13 08/15] block: teach bdrv_debug_breakpoint skip filters with backing, Vladimir Sementsov-Ogievskiy, 2019/09/20
- [PATCH v13 14/15] block: introduce backup-top filter driver, Vladimir Sementsov-Ogievskiy, 2019/09/20
- [PATCH v13 04/15] block/backup: improve comment about image fleecing,
Vladimir Sementsov-Ogievskiy <=
- [PATCH v13 05/15] block/backup: introduce BlockCopyState, Vladimir Sementsov-Ogievskiy, 2019/09/20
- [PATCH v13 07/15] block: move block_copy from block/backup.c to separate file, Vladimir Sementsov-Ogievskiy, 2019/09/20
- [PATCH v13 12/15] block/io: refactor wait_serialising_requests, Vladimir Sementsov-Ogievskiy, 2019/09/20
- [PATCH v13 11/15] iotests: 257: drop device_add, Vladimir Sementsov-Ogievskiy, 2019/09/20
- [PATCH v13 10/15] iotests: 257: drop unused Drive.device field, Vladimir Sementsov-Ogievskiy, 2019/09/20
- [PATCH v13 09/15] iotests: prepare 124 and 257 bitmap querying for backup-top filter, Vladimir Sementsov-Ogievskiy, 2019/09/20
- [PATCH v13 15/15] block/backup: use backup-top instead of write notifiers, Vladimir Sementsov-Ogievskiy, 2019/09/20
- Re: [PATCH v13 00/15] backup-top filter driver for backup, Max Reitz, 2019/09/20