#include <linux/kernel.h>
#include <linux/crc32.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/fs.h>
#include "cluster/masklog.h"
#include "cluster/nodemanager.h"
#include "cluster/heartbeat.h"
#include "cluster/tcp.h"
#include "stackglue.h"
struct o2dlm_private { … };
static struct ocfs2_stack_plugin o2cb_stack;
#if (DLM_LOCK_IV != LKM_IVMODE)
# error Lock modes do not match
#endif
#if (DLM_LOCK_NL != LKM_NLMODE)
# error Lock modes do not match
#endif
#if (DLM_LOCK_CR != LKM_CRMODE)
# error Lock modes do not match
#endif
#if (DLM_LOCK_CW != LKM_CWMODE)
# error Lock modes do not match
#endif
#if (DLM_LOCK_PR != LKM_PRMODE)
# error Lock modes do not match
#endif
#if (DLM_LOCK_PW != LKM_PWMODE)
# error Lock modes do not match
#endif
#if (DLM_LOCK_EX != LKM_EXMODE)
# error Lock modes do not match
#endif
static inline int mode_to_o2dlm(int mode)
{ … }
static int flags_to_o2dlm(u32 flags)
{ … }
static int status_map[] = …;
static int dlm_status_to_errno(enum dlm_status status)
{ … }
static void o2dlm_lock_ast_wrapper(void *astarg)
{ … }
static void o2dlm_blocking_ast_wrapper(void *astarg, int level)
{ … }
static void o2dlm_unlock_ast_wrapper(void *astarg, enum dlm_status status)
{ … }
static int o2cb_dlm_lock(struct ocfs2_cluster_connection *conn,
int mode,
struct ocfs2_dlm_lksb *lksb,
u32 flags,
void *name,
unsigned int namelen)
{ … }
static int o2cb_dlm_unlock(struct ocfs2_cluster_connection *conn,
struct ocfs2_dlm_lksb *lksb,
u32 flags)
{ … }
static int o2cb_dlm_lock_status(struct ocfs2_dlm_lksb *lksb)
{ … }
static int o2cb_dlm_lvb_valid(struct ocfs2_dlm_lksb *lksb)
{ … }
static void *o2cb_dlm_lvb(struct ocfs2_dlm_lksb *lksb)
{ … }
static void o2cb_dump_lksb(struct ocfs2_dlm_lksb *lksb)
{ … }
static int o2cb_cluster_check(void)
{ … }
static void o2dlm_eviction_cb(int node_num, void *data)
{ … }
static int o2cb_cluster_connect(struct ocfs2_cluster_connection *conn)
{ … }
static int o2cb_cluster_disconnect(struct ocfs2_cluster_connection *conn)
{ … }
static int o2cb_cluster_this_node(struct ocfs2_cluster_connection *conn,
unsigned int *node)
{ … }
static const struct ocfs2_stack_operations o2cb_stack_ops = …;
static struct ocfs2_stack_plugin o2cb_stack = …;
static int __init o2cb_stack_init(void)
{ … }
static void __exit o2cb_stack_exit(void)
{ … }
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
module_init(…) …;
module_exit(o2cb_stack_exit);