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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/target/target_cluster_dlm.c | 5 +++++
 1 file changed, 5 insertions(+)

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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux