2006-01-17 16:47:12 +08:00
|
|
|
/*
|
|
|
|
* 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
|
2006-09-01 23:05:15 +08:00
|
|
|
* of the GNU General Public License version 2.
|
2006-01-17 16:47:12 +08:00
|
|
|
*/
|
2006-01-17 00:52:38 +08:00
|
|
|
|
|
|
|
#include <linux/init.h>
|
|
|
|
|
|
|
|
#include "lock_dlm.h"
|
|
|
|
|
2006-04-28 22:59:12 +08:00
|
|
|
static int __init init_lock_dlm(void)
|
2006-01-17 00:52:38 +08:00
|
|
|
{
|
|
|
|
int error;
|
|
|
|
|
2006-08-05 02:14:50 +08:00
|
|
|
error = gfs2_register_lockproto(&gdlm_ops);
|
2006-01-17 00:52:38 +08:00
|
|
|
if (error) {
|
2006-02-28 01:07:05 +08:00
|
|
|
printk(KERN_WARNING "lock_dlm: can't register protocol: %d\n",
|
|
|
|
error);
|
2006-01-17 00:52:38 +08:00
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
error = gdlm_sysfs_init();
|
|
|
|
if (error) {
|
2006-08-05 02:14:50 +08:00
|
|
|
gfs2_unregister_lockproto(&gdlm_ops);
|
2006-01-17 16:47:12 +08:00
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
2006-02-28 01:07:05 +08:00
|
|
|
printk(KERN_INFO
|
|
|
|
"Lock_DLM (built %s %s) installed\n", __DATE__, __TIME__);
|
2006-01-17 00:52:38 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2006-04-28 22:59:12 +08:00
|
|
|
static void __exit exit_lock_dlm(void)
|
2006-01-17 00:52:38 +08:00
|
|
|
{
|
|
|
|
gdlm_sysfs_exit();
|
2006-08-05 02:14:50 +08:00
|
|
|
gfs2_unregister_lockproto(&gdlm_ops);
|
2006-01-17 00:52:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
module_init(init_lock_dlm);
|
|
|
|
module_exit(exit_lock_dlm);
|
|
|
|
|
|
|
|
MODULE_DESCRIPTION("GFS DLM Locking Module");
|
|
|
|
MODULE_AUTHOR("Red Hat, Inc.");
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
|