diff options
author | David Teigland <teigland@redhat.com> | 2006-01-16 16:52:38 (GMT) |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-01-16 16:52:38 (GMT) |
commit | 29b7998d887529eca1ef43c8ca7b278448dc983c (patch) | |
tree | 8968045a976eba9ce349b045c8db7a9ee82a6a2e /fs/gfs2/locking/dlm/main.c | |
parent | b3b94faa5fe5968827ba0640ee9fba4b3e7f736e (diff) | |
download | linux-29b7998d887529eca1ef43c8ca7b278448dc983c.tar.xz |
[GFS2] The lock modules for GFS2
This patch contains the pluggable locking modules
for GFS2.
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/locking/dlm/main.c')
-rw-r--r-- | fs/gfs2/locking/dlm/main.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/fs/gfs2/locking/dlm/main.c b/fs/gfs2/locking/dlm/main.c new file mode 100644 index 0000000..3ced92e --- /dev/null +++ b/fs/gfs2/locking/dlm/main.c @@ -0,0 +1,58 @@ +/****************************************************************************** +******************************************************************************* +** +** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. +** Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. +** +** This copyrighted material is made available to anyone wishing to use, +** modify, copy, or redistribute it subject to the terms and conditions +** of the GNU General Public License v.2. +** +******************************************************************************* +******************************************************************************/ + +#include <linux/init.h> + +#include "lock_dlm.h" + +extern int gdlm_drop_count; +extern int gdlm_drop_period; + +extern struct lm_lockops gdlm_ops; + +int __init init_lock_dlm(void) +{ + int error; + + error = lm_register_proto(&gdlm_ops); + if (error) { + printk("lock_dlm: can't register protocol: %d\n", error); + return error; + } + + error = gdlm_sysfs_init(); + if (error) { + lm_unregister_proto(&gdlm_ops); + return error; + } + + gdlm_drop_count = GDLM_DROP_COUNT; + gdlm_drop_period = GDLM_DROP_PERIOD; + + printk("Lock_DLM (built %s %s) installed\n", __DATE__, __TIME__); + return 0; +} + +void __exit exit_lock_dlm(void) +{ + lm_unregister_proto(&gdlm_ops); + gdlm_sysfs_exit(); +} + +module_init(init_lock_dlm); +module_exit(exit_lock_dlm); + +MODULE_DESCRIPTION("GFS DLM Locking Module"); +MODULE_AUTHOR("Red Hat, Inc."); +MODULE_LICENSE("GPL"); + |