~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/ocfs2/cluster/nodemanager.h

Version: ~ [ linux-5.3 ] ~ [ linux-5.2.15 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.73 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.144 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.193 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.193 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.73 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  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 enum o2nm_fence_method {
 37         O2NM_FENCE_RESET        = 0,
 38         O2NM_FENCE_PANIC,
 39         O2NM_FENCE_METHODS,     /* Number of fence methods */
 40 };
 41 
 42 struct o2nm_node {
 43         spinlock_t              nd_lock;
 44         struct config_item      nd_item;
 45         char                    nd_name[O2NM_MAX_NAME_LEN+1]; /* replace? */
 46         __u8                    nd_num;
 47         /* only one address per node, as attributes, for now. */
 48         __be32                  nd_ipv4_address;
 49         __be16                  nd_ipv4_port;
 50         struct rb_node          nd_ip_node;
 51         /* there can be only one local node for now */
 52         int                     nd_local;
 53 
 54         unsigned long           nd_set_attributes;
 55 };
 56 
 57 struct o2nm_cluster {
 58         struct config_group     cl_group;
 59         unsigned                cl_has_local:1;
 60         u8                      cl_local_node;
 61         rwlock_t                cl_nodes_lock;
 62         struct o2nm_node        *cl_nodes[O2NM_MAX_NODES];
 63         struct rb_root          cl_node_ip_tree;
 64         unsigned int            cl_idle_timeout_ms;
 65         unsigned int            cl_keepalive_delay_ms;
 66         unsigned int            cl_reconnect_delay_ms;
 67         enum o2nm_fence_method  cl_fence_method;
 68 
 69         /* this bitmap is part of a hack for disk bitmap.. will go eventually. - zab */
 70         unsigned long   cl_nodes_bitmap[BITS_TO_LONGS(O2NM_MAX_NODES)];
 71 };
 72 
 73 extern struct o2nm_cluster *o2nm_single_cluster;
 74 
 75 u8 o2nm_this_node(void);
 76 
 77 int o2nm_configured_node_map(unsigned long *map, unsigned bytes);
 78 struct o2nm_node *o2nm_get_node_by_num(u8 node_num);
 79 struct o2nm_node *o2nm_get_node_by_ip(__be32 addr);
 80 void o2nm_node_get(struct o2nm_node *node);
 81 void o2nm_node_put(struct o2nm_node *node);
 82 
 83 int o2nm_depend_item(struct config_item *item);
 84 void o2nm_undepend_item(struct config_item *item);
 85 int o2nm_depend_this_node(void);
 86 void o2nm_undepend_this_node(void);
 87 
 88 #endif /* O2CLUSTER_NODEMANAGER_H */
 89 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp