1 /*	$NetBSD: cluster.h,v 1.1.1.1 2009/12/02 00:27:08 haad Exp $	*/
2 
3 /*
4  * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
5  *
6  * This copyrighted material is made available to anyone wishing to use,
7  * modify, copy, or redistribute it subject to the terms and conditions
8  * of the GNU Lesser General Public License v.2.1.
9  *
10  * You should have received a copy of the GNU Lesser General Public License
11  * along with this program; if not, write to the Free Software Foundation,
12  * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
13  */
14 #ifndef __CLUSTER_LOG_CLUSTER_DOT_H__
15 #define __CLUSTER_LOG_CLUSTER_DOT_H__
16 
17 #include "libdevmapper.h"
18 #include "dm-log-userspace.h"
19 
20 /*
21  * There is other information in addition to what can
22  * be found in the dm_ulog_request structure that we
23  * need for processing.  'clog_request' is the wrapping
24  * structure we use to make the additional fields
25  * available.
26  */
27 struct clog_request {
28 	struct dm_list list;
29 
30 	/*
31 	 * 'originator' is the machine from which the requests
32 	 * was made.
33 	 */
34 	uint32_t originator;
35 
36 	/*
37 	 * 'pit_server' is the "point-in-time" server for the
38 	 * request.  (I.e.  The machine that was the server at
39 	 * the time the request was issued - only important during
40 	 * startup.
41 	 */
42 	uint32_t pit_server;
43 
44 	/*
45 	 * The request from the kernel that is being processed
46 	 */
47 	struct dm_ulog_request u_rq;
48 };
49 
50 int init_cluster(void);
51 void cleanup_cluster(void);
52 void cluster_debug(void);
53 
54 int create_cluster_cpg(char *uuid, uint64_t luid);
55 int destroy_cluster_cpg(char *uuid);
56 
57 int cluster_send(struct clog_request *rq);
58 
59 #endif /* __CLUSTER_LOG_CLUSTER_DOT_H__ */
60