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

Submitted by Konstantin Khorenko on Oct. 29, 2019, 11:42 a.m.

Details

Message ID 201910291142.x9TBgHFN007465@finist_co8.work.ct
State New
Series "ploop: Add comment about COW in snapshot merging"
Headers show

Commit Message

Konstantin Khorenko Oct. 29, 2019, 11:42 a.m.
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@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@virtuozzo.com>
---
 drivers/md/dm-ploop-cmd.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

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);