Create a separate module for clustering support
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Fri, 7 Mar 2014 17:21:15 +0000 (11:21 -0600)
committerGoldwyn Rodrigues <rgoldwyn@suse.com>
Mon, 23 Feb 2015 13:28:42 +0000 (07:28 -0600)
Tagged as EXPERIMENTAL for now.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
drivers/md/Kconfig
drivers/md/Makefile
drivers/md/md-cluster.c [new file with mode: 0644]

index 63e05e3..eed1fec 100644 (file)
@@ -175,6 +175,22 @@ config MD_FAULTY
 
          In unsure, say N.
 
+
+config MD_CLUSTER
+       tristate "Cluster Support for MD (EXPERIMENTAL)"
+       depends on BLK_DEV_MD
+       depends on DLM
+       default n
+       ---help---
+       Clustering support for MD devices. This enables locking and
+       synchronization across multiple systems on the cluster, so all
+       nodes in the cluster can access the MD devices simultaneously.
+
+       This brings the redundancy (and uptime) of RAID levels across the
+       nodes of the cluster.
+
+       If unsure, say N.
+
 source "drivers/md/bcache/Kconfig"
 
 config BLK_DEV_DM_BUILTIN
index a2da532..7ed8687 100644 (file)
@@ -30,6 +30,7 @@ obj-$(CONFIG_MD_RAID10)               += raid10.o
 obj-$(CONFIG_MD_RAID456)       += raid456.o
 obj-$(CONFIG_MD_MULTIPATH)     += multipath.o
 obj-$(CONFIG_MD_FAULTY)                += faulty.o
+obj-$(CONFIG_MD_CLUSTER)       += md-cluster.o
 obj-$(CONFIG_BCACHE)           += bcache/
 obj-$(CONFIG_BLK_DEV_MD)       += md-mod.o
 obj-$(CONFIG_BLK_DEV_DM)       += dm-mod.o
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c
new file mode 100644 (file)
index 0000000..f377e71
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2015, SUSE
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ */
+
+
+#include <linux/module.h>
+
+static int __init cluster_init(void)
+{
+       pr_warn("md-cluster: EXPERIMENTAL. Use with caution\n");
+       pr_info("Registering Cluster MD functions\n");
+       return 0;
+}
+
+static void cluster_exit(void)
+{
+}
+
+module_init(cluster_init);
+module_exit(cluster_exit);
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Clustering support for MD");