diff options
author | Goldwyn Rodrigues <rgoldwyn@suse.com> | 2014-03-29 10:01:53 -0500 |
---|---|---|
committer | Goldwyn Rodrigues <rgoldwyn@suse.com> | 2015-02-23 07:28:42 -0600 |
commit | edb39c9deda87da5aad9c090e2e8eaf8470c852c (patch) | |
tree | 22b789f9e6bdcfd892d9f6a7e757e1fe58579795 /drivers/md/md-cluster.c | |
parent | 47741b7ca7b389d1b45d7cf15edc279c9be32fa8 (diff) |
Introduce md_cluster_operations to handle cluster functions
This allows dynamic registering of cluster hooks.
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Diffstat (limited to 'drivers/md/md-cluster.c')
-rw-r--r-- | drivers/md/md-cluster.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c index bc8ea9d76875..e2235600a72b 100644 --- a/drivers/md/md-cluster.c +++ b/drivers/md/md-cluster.c @@ -13,6 +13,7 @@ #include <linux/dlm.h> #include <linux/sched.h> #include "md.h" +#include "md-cluster.h" #define LVB_SIZE 64 @@ -113,15 +114,32 @@ static void lockres_free(struct dlm_lock_resource *res) kfree(res); } +static int join(struct mddev *mddev, int nodes) +{ + return 0; +} + +static int leave(struct mddev *mddev) +{ + return 0; +} + +static struct md_cluster_operations cluster_ops = { + .join = join, + .leave = leave, +}; + static int __init cluster_init(void) { pr_warn("md-cluster: EXPERIMENTAL. Use with caution\n"); pr_info("Registering Cluster MD functions\n"); + register_md_cluster_operations(&cluster_ops, THIS_MODULE); return 0; } static void cluster_exit(void) { + unregister_md_cluster_operations(); } module_init(cluster_init); |