diff options
author | Kurt Hackel <kurt.hackel@oracle.com> | 2005-12-15 17:31:23 -0500 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2006-01-03 14:45:46 -0500 |
commit | 0c83ed8eeb28a045cdbd0b216679938aa9e665fe (patch) | |
tree | 9b1a839e79acf504854b6efa956fd0a44c216ada /fs/ocfs2/cluster/nodemanager.h | |
parent | 52fd3d6fea441835fe3a35b7280e5e128bdeca9b (diff) |
[PATCH] OCFS2: The Second Oracle Cluster Filesystem
A simple node information service, filled and updated from
userspace. The rest of the stack queries this service for simple node
information.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
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 @@ | |||
1 | /* -*- mode: c; c-basic-offset: 8; -*- | ||
2 | * vim: noexpandtab sw=8 ts=8 sts=0: | ||
3 | * | ||
4 | * nodemanager.h | ||
5 | * | ||
6 | * Function prototypes | ||
7 | * | ||
8 | * Copyright (C) 2004 Oracle. All rights reserved. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public | ||
12 | * License as published by the Free Software Foundation; either | ||
13 | * version 2 of the License, or (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
18 | * General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public | ||
21 | * License along with this program; if not, write to the | ||
22 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
23 | * Boston, MA 021110-1307, USA. | ||
24 | * | ||
25 | */ | ||
26 | |||
27 | #ifndef O2CLUSTER_NODEMANAGER_H | ||
28 | #define O2CLUSTER_NODEMANAGER_H | ||
29 | |||
30 | #include "ocfs2_nodemanager.h" | ||
31 | |||
32 | /* This totally doesn't belong here. */ | ||
33 | #include <linux/configfs.h> | ||
34 | #include <linux/rbtree.h> | ||
35 | |||
36 | #define KERN_OCFS2 988 | ||
37 | #define KERN_OCFS2_NM 1 | ||
38 | |||
39 | const char *o2nm_get_hb_ctl_path(void); | ||
40 | |||
41 | struct o2nm_node { | ||
42 | spinlock_t nd_lock; | ||
43 | struct config_item nd_item; | ||
44 | char nd_name[O2NM_MAX_NAME_LEN+1]; /* replace? */ | ||
45 | __u8 nd_num; | ||
46 | /* only one address per node, as attributes, for now. */ | ||
47 | __be32 nd_ipv4_address; | ||
48 | __be16 nd_ipv4_port; | ||
49 | struct rb_node nd_ip_node; | ||
50 | /* there can be only one local node for now */ | ||
51 | int nd_local; | ||
52 | |||
53 | unsigned long nd_set_attributes; | ||
54 | }; | ||
55 | |||
56 | u8 o2nm_this_node(void); | ||
57 | |||
58 | int o2nm_configured_node_map(unsigned long *map, unsigned bytes); | ||
59 | struct o2nm_node *o2nm_get_node_by_num(u8 node_num); | ||
60 | struct o2nm_node *o2nm_get_node_by_ip(__be32 addr); | ||
61 | void o2nm_node_get(struct o2nm_node *node); | ||
62 | void o2nm_node_put(struct o2nm_node *node); | ||
63 | |||
64 | #endif /* O2CLUSTER_NODEMANAGER_H */ | ||