aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/dlm_internal.h
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2011-11-02 15:30:58 -0400
committerDavid Teigland <teigland@redhat.com>2012-01-04 09:56:31 -0500
commit60f98d1839376d30e13f3e452dce2433fad3060e (patch)
treeb8b43859ad26519bd75a40920f6d1ca46f2d44a5 /fs/dlm/dlm_internal.h
parent757a42719635495779462514458bbfbf12a37dac (diff)
dlm: add recovery callbacks
These new callbacks notify the dlm user about lock recovery. GFS2, and possibly others, need to be aware of when the dlm will be doing lock recovery for a failed lockspace member. In the past, this coordination has been done between dlm and file system daemons in userspace, which then direct their kernel counterparts. These callbacks allow the same coordination directly, and more simply. Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r--fs/dlm/dlm_internal.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index f4d132c76908..3a564d197e99 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -2,7 +2,7 @@
2******************************************************************************* 2*******************************************************************************
3** 3**
4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
5** Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. 5** Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
6** 6**
7** This copyrighted material is made available to anyone wishing to use, 7** This copyrighted material is made available to anyone wishing to use,
8** modify, copy, or redistribute it subject to the terms and conditions 8** modify, copy, or redistribute it subject to the terms and conditions
@@ -119,28 +119,18 @@ struct dlm_member {
119 int weight; 119 int weight;
120 int slot; 120 int slot;
121 int slot_prev; 121 int slot_prev;
122 int comm_seq;
122 uint32_t generation; 123 uint32_t generation;
123}; 124};
124 125
125/* 126/*
126 * low nodeid saves array of these in ls_slots
127 */
128
129struct dlm_slot {
130 int nodeid;
131 int slot;
132};
133
134/*
135 * Save and manage recovery state for a lockspace. 127 * Save and manage recovery state for a lockspace.
136 */ 128 */
137 129
138struct dlm_recover { 130struct dlm_recover {
139 struct list_head list; 131 struct list_head list;
140 int *nodeids; /* nodeids of all members */ 132 struct dlm_config_node *nodes;
141 int node_count; 133 int nodes_count;
142 int *new; /* nodeids of new members */
143 int new_count;
144 uint64_t seq; 134 uint64_t seq;
145}; 135};
146 136
@@ -584,6 +574,9 @@ struct dlm_ls {
584 struct list_head ls_root_list; /* root resources */ 574 struct list_head ls_root_list; /* root resources */
585 struct rw_semaphore ls_root_sem; /* protect root_list */ 575 struct rw_semaphore ls_root_sem; /* protect root_list */
586 576
577 const struct dlm_lockspace_ops *ls_ops;
578 void *ls_ops_arg;
579
587 int ls_namelen; 580 int ls_namelen;
588 char ls_name[1]; 581 char ls_name[1];
589}; 582};