[Devel] [PATCH RHEL8 COMMIT] ploop: Add comment about COW in snapshot merging

Konstantin Khorenko khorenko at virtuozzo.com
Tue Oct 29 14:42:19 MSK 2019


The commit is pushed to "branch-rh8-4.18.0-80.1.2.vz8.2.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-80.1.2.vz8.2.4
------>
commit c9e1cb72f79450e524298d624ca7eab4b079c995
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Tue Oct 29 14:42:17 2019 +0300

    ploop: Add comment about COW in snapshot merging
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-cmd.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c
index c687d7f6fa02..9dea07b276d7 100644
--- a/drivers/md/dm-ploop-cmd.c
+++ b/drivers/md/dm-ploop-cmd.c
@@ -698,7 +698,11 @@ static void process_merge_latest_snapshot_cmd(struct ploop *ploop,
 		/* Check we can submit one more cow in parallel */
 		if (!atomic_add_unless(&cmd->merge.nr_available, -1, 0))
 			return;
-
+		/*
+		 * This adds cluster lk. Further write bios to *cluster will go
+		 * from ploop_map to kwork (because bat_levels[*cluster] is not
+		 * BAT_LEVEL_TOP), so they will see the lk.
+		 */
 		if (submit_cluster_cow(ploop, level, *cluster, dst_cluster,
 				    ploop_queue_deferred_cmd_wrapper, cmd)) {
 			atomic_inc(&cmd->merge.nr_available);



More information about the Devel mailing list