nodemanager.c (79acbb3ff2d8095b692e1502b9eb2ccec348de26) | nodemanager.c (296b75ed6a3b35f613961cefe4962ce1cf586d77) |
---|---|
1/* -*- mode: c; c-basic-offset: 8; -*- 2 * vim: noexpandtab sw=8 ts=8 sts=0: 3 * 4 * Copyright (C) 2004, 2005 Oracle. All rights reserved. 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public 8 * License as published by the Free Software Foundation; either --- 21 unchanged lines hidden (view full) --- 30#include "heartbeat.h" 31#include "masklog.h" 32#include "sys.h" 33#include "ver.h" 34 35/* for now we operate under the assertion that there can be only one 36 * cluster active at a time. Changing this will require trickling 37 * cluster references throughout where nodes are looked up */ | 1/* -*- mode: c; c-basic-offset: 8; -*- 2 * vim: noexpandtab sw=8 ts=8 sts=0: 3 * 4 * Copyright (C) 2004, 2005 Oracle. All rights reserved. 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public 8 * License as published by the Free Software Foundation; either --- 21 unchanged lines hidden (view full) --- 30#include "heartbeat.h" 31#include "masklog.h" 32#include "sys.h" 33#include "ver.h" 34 35/* for now we operate under the assertion that there can be only one 36 * cluster active at a time. Changing this will require trickling 37 * cluster references throughout where nodes are looked up */ |
38static struct o2nm_cluster *o2nm_single_cluster = NULL; | 38struct o2nm_cluster *o2nm_single_cluster = NULL; |
39 40#define OCFS2_MAX_HB_CTL_PATH 256 41static char ocfs2_hb_ctl_path[OCFS2_MAX_HB_CTL_PATH] = "/sbin/ocfs2_hb_ctl"; 42 43static ctl_table ocfs2_nm_table[] = { 44 { 45 .ctl_name = 1, 46 .procname = "hb_ctl_path", --- 45 unchanged lines hidden (view full) --- 92static struct ctl_table_header *ocfs2_table_header = NULL; 93 94const char *o2nm_get_hb_ctl_path(void) 95{ 96 return ocfs2_hb_ctl_path; 97} 98EXPORT_SYMBOL_GPL(o2nm_get_hb_ctl_path); 99 | 39 40#define OCFS2_MAX_HB_CTL_PATH 256 41static char ocfs2_hb_ctl_path[OCFS2_MAX_HB_CTL_PATH] = "/sbin/ocfs2_hb_ctl"; 42 43static ctl_table ocfs2_nm_table[] = { 44 { 45 .ctl_name = 1, 46 .procname = "hb_ctl_path", --- 45 unchanged lines hidden (view full) --- 92static struct ctl_table_header *ocfs2_table_header = NULL; 93 94const char *o2nm_get_hb_ctl_path(void) 95{ 96 return ocfs2_hb_ctl_path; 97} 98EXPORT_SYMBOL_GPL(o2nm_get_hb_ctl_path); 99 |
100struct o2nm_cluster { 101 struct config_group cl_group; 102 unsigned cl_has_local:1; 103 u8 cl_local_node; 104 rwlock_t cl_nodes_lock; 105 struct o2nm_node *cl_nodes[O2NM_MAX_NODES]; 106 struct rb_root cl_node_ip_tree; 107 /* this bitmap is part of a hack for disk bitmap.. will go eventually. - zab */ 108 unsigned long cl_nodes_bitmap[BITS_TO_LONGS(O2NM_MAX_NODES)]; 109}; 110 | |
111struct o2nm_node *o2nm_get_node_by_num(u8 node_num) 112{ 113 struct o2nm_node *node = NULL; 114 115 if (node_num >= O2NM_MAX_NODES || o2nm_single_cluster == NULL) 116 goto out; 117 118 read_lock(&o2nm_single_cluster->cl_nodes_lock); --- 677 unchanged lines hidden --- | 100struct o2nm_node *o2nm_get_node_by_num(u8 node_num) 101{ 102 struct o2nm_node *node = NULL; 103 104 if (node_num >= O2NM_MAX_NODES || o2nm_single_cluster == NULL) 105 goto out; 106 107 read_lock(&o2nm_single_cluster->cl_nodes_lock); --- 677 unchanged lines hidden --- |