diff mbox series

[RFC,41/48] target: cluster: sync-up PR data on cluster join

Message ID 20220803162857.27770-42-d.bogdanov@yadro.com (mailing list archive)
State New, archived
Headers show
Series Target cluster implementation over DLM | expand

Commit Message

Dmitry Bogdanov Dec. 17, 2021, 9:27 a.m. UTC
Read PR data from cluster on joining to the cluster.
acl/lun/tpg are supposed to be configured already.

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
---
 drivers/target/target_cluster_dlm.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/drivers/target/target_cluster_dlm.c b/drivers/target/target_cluster_dlm.c
index 6dbe1a0b21e2..16391a8661fa 100644
--- a/drivers/target/target_cluster_dlm.c
+++ b/drivers/target/target_cluster_dlm.c
@@ -152,6 +152,11 @@  static int target_init_dlm(struct se_device *dev)
 
 	dev->cluster_data = cluster_data;
 
+	/* initial sync-up on joining the cluster */
+	dlm_ckv_lock_get(cluster_data->pr_lock);
+	target_pr_sync_cb(dev);
+	dlm_ckv_lock_release(cluster_data->pr_lock);
+
 	return err;
 fail:
 	if (cluster_data->pr_sync_notify)