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

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

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  * heartbeat.h
  4  *
  5  * Function prototypes
  6  *
  7  * Copyright (C) 2004 Oracle.  All rights reserved.
  8  */
  9 
 10 #ifndef O2CLUSTER_HEARTBEAT_H
 11 #define O2CLUSTER_HEARTBEAT_H
 12 
 13 #include "ocfs2_heartbeat.h"
 14 
 15 #define O2HB_REGION_TIMEOUT_MS          2000
 16 
 17 #define O2HB_MAX_REGION_NAME_LEN        32
 18 
 19 /* number of changes to be seen as live */
 20 #define O2HB_LIVE_THRESHOLD        2
 21 /* number of equal samples to be seen as dead */
 22 extern unsigned int o2hb_dead_threshold;
 23 #define O2HB_DEFAULT_DEAD_THRESHOLD        31
 24 /* Otherwise MAX_WRITE_TIMEOUT will be zero... */
 25 #define O2HB_MIN_DEAD_THRESHOLD   2
 26 #define O2HB_MAX_WRITE_TIMEOUT_MS (O2HB_REGION_TIMEOUT_MS * (o2hb_dead_threshold - 1))
 27 
 28 #define O2HB_CB_MAGIC           0x51d1e4ec
 29 
 30 /* callback stuff */
 31 enum o2hb_callback_type {
 32         O2HB_NODE_DOWN_CB = 0,
 33         O2HB_NODE_UP_CB,
 34         O2HB_NUM_CB
 35 };
 36 
 37 struct o2nm_node;
 38 typedef void (o2hb_cb_func)(struct o2nm_node *, int, void *);
 39 
 40 struct o2hb_callback_func {
 41         u32                     hc_magic;
 42         struct list_head        hc_item;
 43         o2hb_cb_func            *hc_func;
 44         void                    *hc_data;
 45         int                     hc_priority;
 46         enum o2hb_callback_type hc_type;
 47 };
 48 
 49 struct config_group *o2hb_alloc_hb_set(void);
 50 void o2hb_free_hb_set(struct config_group *group);
 51 
 52 void o2hb_setup_callback(struct o2hb_callback_func *hc,
 53                          enum o2hb_callback_type type,
 54                          o2hb_cb_func *func,
 55                          void *data,
 56                          int priority);
 57 int o2hb_register_callback(const char *region_uuid,
 58                            struct o2hb_callback_func *hc);
 59 void o2hb_unregister_callback(const char *region_uuid,
 60                               struct o2hb_callback_func *hc);
 61 void o2hb_fill_node_map(unsigned long *map,
 62                         unsigned int bits);
 63 void o2hb_exit(void);
 64 void o2hb_init(void);
 65 int o2hb_check_node_heartbeating_no_sem(u8 node_num);
 66 int o2hb_check_node_heartbeating_from_callback(u8 node_num);
 67 void o2hb_stop_all_regions(void);
 68 int o2hb_get_all_regions(char *region_uuids, u8 numregions);
 69 int o2hb_global_heartbeat_active(void);
 70 
 71 #endif /* O2CLUSTER_HEARTBEAT_H */
 72 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php