diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2006-01-19 17:39:33 +0100 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2006-01-19 17:39:33 +0100 |
commit | 944d79559d154c12becde0dab327016cf438f46c (patch) | |
tree | 50c101806f4d3b6585222dda060559eb4f3e005a /fs/ocfs2/cluster/nodemanager.h | |
parent | Merge branch 'master' of /usr/src/ntfs-2.6/ (diff) | |
parent | Merge master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6 (diff) | |
download | linux-944d79559d154c12becde0dab327016cf438f46c.tar.xz linux-944d79559d154c12becde0dab327016cf438f46c.zip |
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'fs/ocfs2/cluster/nodemanager.h')
-rw-r--r-- | fs/ocfs2/cluster/nodemanager.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/fs/ocfs2/cluster/nodemanager.h b/fs/ocfs2/cluster/nodemanager.h new file mode 100644 index 000000000000..fce8033c310f --- /dev/null +++ b/fs/ocfs2/cluster/nodemanager.h @@ -0,0 +1,64 @@ +/* -*- mode: c; c-basic-offset: 8; -*- + * vim: noexpandtab sw=8 ts=8 sts=0: + * + * nodemanager.h + * + * Function prototypes + * + * Copyright (C) 2004 Oracle. All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 021110-1307, USA. + * + */ + +#ifndef O2CLUSTER_NODEMANAGER_H +#define O2CLUSTER_NODEMANAGER_H + +#include "ocfs2_nodemanager.h" + +/* This totally doesn't belong here. */ +#include <linux/configfs.h> +#include <linux/rbtree.h> + +#define KERN_OCFS2 988 +#define KERN_OCFS2_NM 1 + +const char *o2nm_get_hb_ctl_path(void); + +struct o2nm_node { + spinlock_t nd_lock; + struct config_item nd_item; + char nd_name[O2NM_MAX_NAME_LEN+1]; /* replace? */ + __u8 nd_num; + /* only one address per node, as attributes, for now. */ + __be32 nd_ipv4_address; + __be16 nd_ipv4_port; + struct rb_node nd_ip_node; + /* there can be only one local node for now */ + int nd_local; + + unsigned long nd_set_attributes; +}; + +u8 o2nm_this_node(void); + +int o2nm_configured_node_map(unsigned long *map, unsigned bytes); +struct o2nm_node *o2nm_get_node_by_num(u8 node_num); +struct o2nm_node *o2nm_get_node_by_ip(__be32 addr); +void o2nm_node_get(struct o2nm_node *node); +void o2nm_node_put(struct o2nm_node *node); + +#endif /* O2CLUSTER_NODEMANAGER_H */ |