diff options
Diffstat (limited to 'fs/ocfs2/stackglue.c')
-rw-r--r-- | fs/ocfs2/stackglue.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c index f6f309a08344..814686356cc6 100644 --- a/fs/ocfs2/stackglue.c +++ b/fs/ocfs2/stackglue.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
26 | 26 | ||
27 | #include "cluster/masklog.h" | 27 | #include "cluster/masklog.h" |
28 | #include "cluster/nodemanager.h" | ||
29 | |||
28 | #include "stackglue.h" | 30 | #include "stackglue.h" |
29 | 31 | ||
30 | static struct ocfs2_locking_protocol *lproto; | 32 | static struct ocfs2_locking_protocol *lproto; |
@@ -371,6 +373,21 @@ int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn) | |||
371 | return 0; | 373 | return 0; |
372 | } | 374 | } |
373 | 375 | ||
376 | int ocfs2_cluster_this_node(unsigned int *node) | ||
377 | { | ||
378 | int node_num; | ||
379 | |||
380 | node_num = o2nm_this_node(); | ||
381 | if (node_num == O2NM_INVALID_NODE_NUM) | ||
382 | return -ENOENT; | ||
383 | |||
384 | if (node_num >= O2NM_MAX_NODES) | ||
385 | return -EOVERFLOW; | ||
386 | |||
387 | *node = node_num; | ||
388 | return 0; | ||
389 | } | ||
390 | |||
374 | void o2cb_get_stack(struct ocfs2_locking_protocol *proto) | 391 | void o2cb_get_stack(struct ocfs2_locking_protocol *proto) |
375 | { | 392 | { |
376 | BUG_ON(proto == NULL); | 393 | BUG_ON(proto == NULL); |