summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorGoldwyn Rodrigues <rgoldwyn@suse.com>2014-03-29 16:20:02 +0100
committerGoldwyn Rodrigues <rgoldwyn@suse.com>2015-02-23 14:28:42 +0100
commitc4ce867fdad200dfd8aa8cbe1eabc26c14c51635 (patch)
tree529e265c90fbc91a3d4fe8a327f9d7ff9a284890 /drivers/md/md.c
parentIntroduce md_cluster_operations to handle cluster functions (diff)
downloadlinux-c4ce867fdad200dfd8aa8cbe1eabc26c14c51635.tar.xz
linux-c4ce867fdad200dfd8aa8cbe1eabc26c14c51635.zip
Introduce md_cluster_info
md_cluster_info stores the cluster information in the MD device. The join() is called when mddev detects it is a clustered device. The main responsibilities are: 1. Setup a DLM lockspace 2. Setup all initial locks such as super block locks and bitmap lock (will come later) The leave() clears up the lockspace and all the locks held. Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 57ecb51ec5fd..3387f940140b 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7279,6 +7279,8 @@ int md_setup_cluster(struct mddev *mddev, int nodes)
void md_cluster_stop(struct mddev *mddev)
{
+ if (!md_cluster_ops)
+ return;
md_cluster_ops->leave(mddev);
module_put(md_cluster_mod);
}