[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 11/15] qcow2: fix misleading comment about L2 lin
From: |
Anton Nefedov |
Subject: |
[Qemu-devel] [PATCH v2 11/15] qcow2: fix misleading comment about L2 linking |
Date: |
Thu, 1 Jun 2017 18:14:29 +0300 |
Signed-off-by: Anton Nefedov <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
---
block/qcow2-cluster.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index ed65961..3dafd19 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -827,12 +827,10 @@ int qcow2_alloc_cluster_link_l2(BlockDriverState *bs,
QCowL2Meta *m)
assert(l2_index + m->nb_clusters <= s->l2_size);
for (i = 0; i < m->nb_clusters; i++) {
- /* if two concurrent writes happen to the same unallocated cluster
- * each write allocates separate cluster and writes data concurrently.
- * The first one to complete updates l2 table with pointer to its
- * cluster the second one has to do RMW (which is done above by
- * perform_cow()), update l2 table with its cluster pointer and free
- * old cluster. This is what this loop does */
+ /* handle_dependencies() protects from normal cluster allocation
+ * collision; still L2 entry might be !0 in case of zero or compressed
+ * cluster reusage or writing over the snapshot
+ */
if (l2_table[l2_index + i] != 0) {
old_cluster[j++] = l2_table[l2_index + i];
}
--
2.7.4
- [Qemu-devel] [PATCH v2 05/15] qcow2: do not COW the empty areas, (continued)
- [Qemu-devel] [PATCH v2 05/15] qcow2: do not COW the empty areas, Anton Nefedov, 2017/06/01
- [Qemu-devel] [PATCH v2 03/15] blkdebug: support BDRV_REQ_ALLOCATE, Anton Nefedov, 2017/06/01
- [Qemu-devel] [PATCH v2 07/15] qcow2: set inactive flag, Anton Nefedov, 2017/06/01
- [Qemu-devel] [PATCH v2 10/15] qcow2: handle_prealloc(): find out if area zeroed by earlier preallocation, Anton Nefedov, 2017/06/01
- [Qemu-devel] [PATCH v2 06/15] qcow2: preallocation at image expand, Anton Nefedov, 2017/06/01
- [Qemu-devel] [PATCH v2 08/15] qcow2: truncate preallocated space, Anton Nefedov, 2017/06/01
- [Qemu-devel] [PATCH v2 09/15] qcow2: check space leak at the end of the image, Anton Nefedov, 2017/06/01
- [Qemu-devel] [PATCH v2 11/15] qcow2: fix misleading comment about L2 linking,
Anton Nefedov <=
- [Qemu-devel] [PATCH v2 12/15] qcow2-cluster: slightly refactor handle_dependencies(), Anton Nefedov, 2017/06/01
- [Qemu-devel] [PATCH v2 13/15] qcow2-cluster: make handle_dependencies() logic easier to follow, Anton Nefedov, 2017/06/01
- [Qemu-devel] [PATCH v2 15/15] iotest 046: test simultaneous cluster write error case, Anton Nefedov, 2017/06/01
- [Qemu-devel] [PATCH v2 14/15] qcow2: allow concurrent unaligned writes to the same clusters, Anton Nefedov, 2017/06/01
- Re: [Qemu-devel] [PATCH v2 00/15] qcow2: space preallocation and COW improvements, John Snow, 2017/06/01