/usr/include/o2cb/o2cb.h is in ocfs2-tools-dev 1.6.4-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | /* -*- mode: c; c-basic-offset: 8; -*-
* vim: noexpandtab sw=8 ts=8 sts=0:
*
* o2cb.h
*
* Routines for accessing the o2cb configuration.
*
* Copyright (C) 2004 Oracle. All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License, version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 021110-1307, USA.
*/
#ifndef _O2CB_H
#define _O2CB_H
#ifndef _XOPEN_SOURCE
# define _XOPEN_SOURCE 600
#endif
#ifndef _LARGEFILE64_SOURCE
# define _LARGEFILE64_SOURCE
#endif
#include <stdio.h>
#include <stdint.h>
#include <sys/stat.h>
#include <time.h>
#include <linux/types.h>
#include <et/com_err.h>
#include <ocfs2-kernel/sparse_endian_types.h>
#include <o2cb/o2cb_err.h>
#include <o2cb/ocfs2_nodemanager.h>
#include <o2cb/ocfs2_heartbeat.h>
#define OCFS2_FS_NAME "ocfs2"
errcode_t o2cb_init(void);
errcode_t o2cb_get_stack_name(const char **name);
errcode_t o2cb_create_cluster(const char *cluster_name);
errcode_t o2cb_remove_cluster(const char *cluster_name);
errcode_t o2cb_add_node(const char *cluster_name,
const char *node_name, const char *node_num,
const char *ip_address, const char *ip_port,
const char *local);
errcode_t o2cb_del_node(const char *cluster_name, const char *node_name);
errcode_t o2cb_list_clusters(char ***clusters);
void o2cb_free_cluster_list(char **clusters);
errcode_t o2cb_list_nodes(char *cluster_name, char ***nodes);
void o2cb_free_nodes_list(char **nodes);
errcode_t o2cb_control_daemon_debug(char **debug);
struct o2cb_cluster_desc {
char *c_stack; /* The cluster stack, NULL for classic */
char *c_cluster; /* The name of the cluster, NULL for the
default cluster, which is only valid in
the classic stack. */
};
struct o2cb_region_desc {
char *r_name; /* The uuid of the region */
char *r_device_name; /* The device the region is on */
char *r_service; /* A program or mountpoint */
int r_block_bytes;
uint64_t r_start_block;
uint64_t r_blocks;
int r_persist; /* Persist past process exit */
};
/* Expected use case for the region descriptor is to allocate it on
* the stack and completely fill it before calling
* begin_group_join(). Regular programs (not mount.ocfs2) should provide
* a mountpoint that does not begin with a '/'. Eg, fsck could use "fsck"
*/
errcode_t o2cb_begin_group_join(struct o2cb_cluster_desc *cluster,
struct o2cb_region_desc *region);
errcode_t o2cb_complete_group_join(struct o2cb_cluster_desc *cluster,
struct o2cb_region_desc *region,
int result);
errcode_t o2cb_group_leave(struct o2cb_cluster_desc *cluster,
struct o2cb_region_desc *region);
errcode_t o2cb_get_hb_thread_pid (const char *cluster_name,
const char *region_name,
pid_t *pid);
errcode_t o2cb_get_region_ref(const char *region_name,
int undo);
errcode_t o2cb_put_region_ref(const char *region_name,
int undo);
errcode_t o2cb_num_region_refs(const char *region_name,
int *num_refs);
errcode_t o2cb_get_node_num(const char *cluster_name,
const char *node_name,
uint16_t *node_num);
void o2cb_free_cluster_desc(struct o2cb_cluster_desc *cluster);
errcode_t o2cb_running_cluster_desc(struct o2cb_cluster_desc *cluster);
struct ocfs2_protocol_version {
uint8_t pv_major;
uint8_t pv_minor;
};
errcode_t o2cb_get_max_locking_protocol(struct ocfs2_protocol_version *proto);
errcode_t o2cb_control_open(unsigned int this_node,
struct ocfs2_protocol_version *proto);
void o2cb_control_close(void);
errcode_t o2cb_control_node_down(const char *uuid, unsigned int nodeid);
errcode_t o2cb_get_hb_ctl_path(char *buf, int count);
#endif /* _O2CB_H */
|