#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/configfs.h>
#include "tcp.h"
#include "nodemanager.h"
#include "heartbeat.h"
#include "masklog.h"
#include "sys.h"
struct o2nm_cluster *o2nm_single_cluster = …;
static const char *o2nm_fence_method_desc[O2NM_FENCE_METHODS] = …;
static inline void o2nm_lock_subsystem(void);
static inline void o2nm_unlock_subsystem(void);
struct o2nm_node *o2nm_get_node_by_num(u8 node_num)
{ … }
EXPORT_SYMBOL_GPL(…);
int o2nm_configured_node_map(unsigned long *map, unsigned bytes)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct o2nm_node *o2nm_node_ip_tree_lookup(struct o2nm_cluster *cluster,
__be32 ip_needle,
struct rb_node ***ret_p,
struct rb_node **ret_parent)
{ … }
struct o2nm_node *o2nm_get_node_by_ip(__be32 addr)
{ … }
EXPORT_SYMBOL_GPL(…);
void o2nm_node_put(struct o2nm_node *node)
{ … }
EXPORT_SYMBOL_GPL(…);
void o2nm_node_get(struct o2nm_node *node)
{ … }
EXPORT_SYMBOL_GPL(…);
u8 o2nm_this_node(void)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct o2nm_cluster *to_o2nm_cluster(struct config_item *item)
{ … }
static struct o2nm_node *to_o2nm_node(struct config_item *item)
{ … }
static void o2nm_node_release(struct config_item *item)
{ … }
static ssize_t o2nm_node_num_show(struct config_item *item, char *page)
{ … }
static struct o2nm_cluster *to_o2nm_cluster_from_node(struct o2nm_node *node)
{ … }
enum { … };
static ssize_t o2nm_node_num_store(struct config_item *item, const char *page,
size_t count)
{ … }
static ssize_t o2nm_node_ipv4_port_show(struct config_item *item, char *page)
{ … }
static ssize_t o2nm_node_ipv4_port_store(struct config_item *item,
const char *page, size_t count)
{ … }
static ssize_t o2nm_node_ipv4_address_show(struct config_item *item, char *page)
{ … }
static ssize_t o2nm_node_ipv4_address_store(struct config_item *item,
const char *page,
size_t count)
{ … }
static ssize_t o2nm_node_local_show(struct config_item *item, char *page)
{ … }
static ssize_t o2nm_node_local_store(struct config_item *item, const char *page,
size_t count)
{ … }
CONFIGFS_ATTR(…);
CONFIGFS_ATTR(…);
CONFIGFS_ATTR(…);
CONFIGFS_ATTR(…);
static struct configfs_attribute *o2nm_node_attrs[] = …;
static struct configfs_item_operations o2nm_node_item_ops = …;
static const struct config_item_type o2nm_node_type = …;
struct o2nm_node_group { … };
#if 0
static struct o2nm_node_group *to_o2nm_node_group(struct config_group *group)
{
return group ?
container_of(group, struct o2nm_node_group, ns_group)
: NULL;
}
#endif
static ssize_t o2nm_cluster_attr_write(const char *page, ssize_t count,
unsigned int *val)
{ … }
static ssize_t o2nm_cluster_idle_timeout_ms_show(struct config_item *item,
char *page)
{ … }
static ssize_t o2nm_cluster_idle_timeout_ms_store(struct config_item *item,
const char *page, size_t count)
{ … }
static ssize_t o2nm_cluster_keepalive_delay_ms_show(
struct config_item *item, char *page)
{ … }
static ssize_t o2nm_cluster_keepalive_delay_ms_store(
struct config_item *item, const char *page, size_t count)
{ … }
static ssize_t o2nm_cluster_reconnect_delay_ms_show(
struct config_item *item, char *page)
{ … }
static ssize_t o2nm_cluster_reconnect_delay_ms_store(
struct config_item *item, const char *page, size_t count)
{ … }
static ssize_t o2nm_cluster_fence_method_show(
struct config_item *item, char *page)
{ … }
static ssize_t o2nm_cluster_fence_method_store(
struct config_item *item, const char *page, size_t count)
{ … }
CONFIGFS_ATTR(…);
CONFIGFS_ATTR(…);
CONFIGFS_ATTR(…);
CONFIGFS_ATTR(…);
static struct configfs_attribute *o2nm_cluster_attrs[] = …;
static struct config_item *o2nm_node_group_make_item(struct config_group *group,
const char *name)
{ … }
static void o2nm_node_group_drop_item(struct config_group *group,
struct config_item *item)
{ … }
static struct configfs_group_operations o2nm_node_group_group_ops = …;
static const struct config_item_type o2nm_node_group_type = …;
static void o2nm_cluster_release(struct config_item *item)
{ … }
static struct configfs_item_operations o2nm_cluster_item_ops = …;
static const struct config_item_type o2nm_cluster_type = …;
struct o2nm_cluster_group { … };
#if 0
static struct o2nm_cluster_group *to_o2nm_cluster_group(struct config_group *group)
{
return group ?
container_of(to_configfs_subsystem(group), struct o2nm_cluster_group, cs_subsys)
: NULL;
}
#endif
static struct config_group *o2nm_cluster_group_make_group(struct config_group *group,
const char *name)
{ … }
static void o2nm_cluster_group_drop_item(struct config_group *group, struct config_item *item)
{ … }
static struct configfs_group_operations o2nm_cluster_group_group_ops = …;
static const struct config_item_type o2nm_cluster_group_type = …;
static struct o2nm_cluster_group o2nm_cluster_group = …;
static inline void o2nm_lock_subsystem(void)
{ … }
static inline void o2nm_unlock_subsystem(void)
{ … }
int o2nm_depend_item(struct config_item *item)
{ … }
void o2nm_undepend_item(struct config_item *item)
{ … }
int o2nm_depend_this_node(void)
{ … }
void o2nm_undepend_this_node(void)
{ … }
static void __exit exit_o2nm(void)
{ … }
static int __init init_o2nm(void)
{ … }
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
module_init(…) …
module_exit(…)