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