@@ -70,20 +70,24 @@ struct fsdlm_lksb_plus_lvb {
7070 * size of the union is known. Lock status structures are embedded in
7171 * ocfs2 inodes.
7272 */
73- union ocfs2_dlm_lksb {
74- struct dlm_lockstatus lksb_o2dlm ;
75- struct dlm_lksb lksb_fsdlm ;
76- struct fsdlm_lksb_plus_lvb padding ;
73+ struct ocfs2_cluster_connection ;
74+ struct ocfs2_dlm_lksb {
75+ union {
76+ struct dlm_lockstatus lksb_o2dlm ;
77+ struct dlm_lksb lksb_fsdlm ;
78+ struct fsdlm_lksb_plus_lvb padding ;
79+ };
80+ struct ocfs2_cluster_connection * lksb_conn ;
7781};
7882
7983/*
8084 * The ocfs2_locking_protocol defines the handlers called on ocfs2's behalf.
8185 */
8286struct ocfs2_locking_protocol {
8387 struct ocfs2_protocol_version lp_max_version ;
84- void (* lp_lock_ast )(union ocfs2_dlm_lksb * lksb );
85- void (* lp_blocking_ast )(union ocfs2_dlm_lksb * lksb , int level );
86- void (* lp_unlock_ast )(union ocfs2_dlm_lksb * lksb , int error );
88+ void (* lp_lock_ast )(struct ocfs2_dlm_lksb * lksb );
89+ void (* lp_blocking_ast )(struct ocfs2_dlm_lksb * lksb , int level );
90+ void (* lp_unlock_ast )(struct ocfs2_dlm_lksb * lksb , int error );
8791};
8892
8993
@@ -161,7 +165,7 @@ struct ocfs2_stack_operations {
161165 */
162166 int (* dlm_lock )(struct ocfs2_cluster_connection * conn ,
163167 int mode ,
164- union ocfs2_dlm_lksb * lksb ,
168+ struct ocfs2_dlm_lksb * lksb ,
165169 u32 flags ,
166170 void * name ,
167171 unsigned int namelen );
@@ -176,7 +180,7 @@ struct ocfs2_stack_operations {
176180 * function. The caller can use this to find their object.
177181 */
178182 int (* dlm_unlock )(struct ocfs2_cluster_connection * conn ,
179- union ocfs2_dlm_lksb * lksb ,
183+ struct ocfs2_dlm_lksb * lksb ,
180184 u32 flags );
181185
182186 /*
@@ -185,17 +189,17 @@ struct ocfs2_stack_operations {
185189 * callback pulls out the stack-specific lksb, converts the status
186190 * to a proper errno, and returns it.
187191 */
188- int (* lock_status )(union ocfs2_dlm_lksb * lksb );
192+ int (* lock_status )(struct ocfs2_dlm_lksb * lksb );
189193
190194 /*
191195 * Return non-zero if the LVB is valid.
192196 */
193- int (* lvb_valid )(union ocfs2_dlm_lksb * lksb );
197+ int (* lvb_valid )(struct ocfs2_dlm_lksb * lksb );
194198
195199 /*
196200 * Pull the lvb pointer off of the stack-specific lksb.
197201 */
198- void * (* lock_lvb )(union ocfs2_dlm_lksb * lksb );
202+ void * (* lock_lvb )(struct ocfs2_dlm_lksb * lksb );
199203
200204 /*
201205 * Cluster-aware posix locks
@@ -212,7 +216,7 @@ struct ocfs2_stack_operations {
212216 * This is an optoinal debugging hook. If provided, the
213217 * stack can dump debugging information about this lock.
214218 */
215- void (* dump_lksb )(union ocfs2_dlm_lksb * lksb );
219+ void (* dump_lksb )(struct ocfs2_dlm_lksb * lksb );
216220};
217221
218222/*
@@ -248,18 +252,18 @@ int ocfs2_cluster_this_node(unsigned int *node);
248252struct ocfs2_lock_res ;
249253int ocfs2_dlm_lock (struct ocfs2_cluster_connection * conn ,
250254 int mode ,
251- union ocfs2_dlm_lksb * lksb ,
255+ struct ocfs2_dlm_lksb * lksb ,
252256 u32 flags ,
253257 void * name ,
254258 unsigned int namelen );
255259int ocfs2_dlm_unlock (struct ocfs2_cluster_connection * conn ,
256- union ocfs2_dlm_lksb * lksb ,
260+ struct ocfs2_dlm_lksb * lksb ,
257261 u32 flags );
258262
259- int ocfs2_dlm_lock_status (union ocfs2_dlm_lksb * lksb );
260- int ocfs2_dlm_lvb_valid (union ocfs2_dlm_lksb * lksb );
261- void * ocfs2_dlm_lvb (union ocfs2_dlm_lksb * lksb );
262- void ocfs2_dlm_dump_lksb (union ocfs2_dlm_lksb * lksb );
263+ int ocfs2_dlm_lock_status (struct ocfs2_dlm_lksb * lksb );
264+ int ocfs2_dlm_lvb_valid (struct ocfs2_dlm_lksb * lksb );
265+ void * ocfs2_dlm_lvb (struct ocfs2_dlm_lksb * lksb );
266+ void ocfs2_dlm_dump_lksb (struct ocfs2_dlm_lksb * lksb );
263267
264268int ocfs2_stack_supports_plocks (void );
265269int ocfs2_plock (struct ocfs2_cluster_connection * conn , u64 ino ,
0 commit comments