diff options
| -rw-r--r-- | fs/ocfs2/dlmglue.c | 8 | ||||
| -rw-r--r-- | fs/ocfs2/ocfs2.h | 2 | ||||
| -rw-r--r-- | fs/ocfs2/stack_o2cb.c | 18 | ||||
| -rw-r--r-- | fs/ocfs2/stack_user.c | 16 | ||||
| -rw-r--r-- | fs/ocfs2/stackglue.c | 17 | ||||
| -rw-r--r-- | fs/ocfs2/stackglue.h | 42 |
6 files changed, 56 insertions, 47 deletions
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 1ba67df00924..2bb868b7b44f 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c | |||
| @@ -297,7 +297,7 @@ static inline int ocfs2_is_inode_lock(struct ocfs2_lock_res *lockres) | |||
| 297 | lockres->l_type == OCFS2_LOCK_TYPE_OPEN; | 297 | lockres->l_type == OCFS2_LOCK_TYPE_OPEN; |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | static inline struct ocfs2_lock_res *ocfs2_lksb_to_lock_res(union ocfs2_dlm_lksb *lksb) | 300 | static inline struct ocfs2_lock_res *ocfs2_lksb_to_lock_res(struct ocfs2_dlm_lksb *lksb) |
| 301 | { | 301 | { |
| 302 | return container_of(lksb, struct ocfs2_lock_res, l_lksb); | 302 | return container_of(lksb, struct ocfs2_lock_res, l_lksb); |
| 303 | } | 303 | } |
| @@ -1046,7 +1046,7 @@ static unsigned int lockres_set_pending(struct ocfs2_lock_res *lockres) | |||
| 1046 | } | 1046 | } |
| 1047 | 1047 | ||
| 1048 | 1048 | ||
| 1049 | static void ocfs2_blocking_ast(union ocfs2_dlm_lksb *lksb, int level) | 1049 | static void ocfs2_blocking_ast(struct ocfs2_dlm_lksb *lksb, int level) |
| 1050 | { | 1050 | { |
| 1051 | struct ocfs2_lock_res *lockres = ocfs2_lksb_to_lock_res(lksb); | 1051 | struct ocfs2_lock_res *lockres = ocfs2_lksb_to_lock_res(lksb); |
| 1052 | struct ocfs2_super *osb = ocfs2_get_lockres_osb(lockres); | 1052 | struct ocfs2_super *osb = ocfs2_get_lockres_osb(lockres); |
| @@ -1077,7 +1077,7 @@ static void ocfs2_blocking_ast(union ocfs2_dlm_lksb *lksb, int level) | |||
| 1077 | ocfs2_wake_downconvert_thread(osb); | 1077 | ocfs2_wake_downconvert_thread(osb); |
| 1078 | } | 1078 | } |
| 1079 | 1079 | ||
| 1080 | static void ocfs2_locking_ast(union ocfs2_dlm_lksb *lksb) | 1080 | static void ocfs2_locking_ast(struct ocfs2_dlm_lksb *lksb) |
| 1081 | { | 1081 | { |
| 1082 | struct ocfs2_lock_res *lockres = ocfs2_lksb_to_lock_res(lksb); | 1082 | struct ocfs2_lock_res *lockres = ocfs2_lksb_to_lock_res(lksb); |
| 1083 | struct ocfs2_super *osb = ocfs2_get_lockres_osb(lockres); | 1083 | struct ocfs2_super *osb = ocfs2_get_lockres_osb(lockres); |
| @@ -3058,7 +3058,7 @@ void ocfs2_dlm_shutdown(struct ocfs2_super *osb, | |||
| 3058 | mlog_exit_void(); | 3058 | mlog_exit_void(); |
| 3059 | } | 3059 | } |
| 3060 | 3060 | ||
| 3061 | static void ocfs2_unlock_ast(union ocfs2_dlm_lksb *lksb, int error) | 3061 | static void ocfs2_unlock_ast(struct ocfs2_dlm_lksb *lksb, int error) |
| 3062 | { | 3062 | { |
| 3063 | struct ocfs2_lock_res *lockres = ocfs2_lksb_to_lock_res(lksb); | 3063 | struct ocfs2_lock_res *lockres = ocfs2_lksb_to_lock_res(lksb); |
| 3064 | unsigned long flags; | 3064 | unsigned long flags; |
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index 8857dd724f90..b27fe2489e0c 100644 --- a/fs/ocfs2/ocfs2.h +++ b/fs/ocfs2/ocfs2.h | |||
| @@ -159,7 +159,7 @@ struct ocfs2_lock_res { | |||
| 159 | int l_level; | 159 | int l_level; |
| 160 | unsigned int l_ro_holders; | 160 | unsigned int l_ro_holders; |
| 161 | unsigned int l_ex_holders; | 161 | unsigned int l_ex_holders; |
| 162 | union ocfs2_dlm_lksb l_lksb; | 162 | struct ocfs2_dlm_lksb l_lksb; |
| 163 | 163 | ||
| 164 | /* used from AST/BAST funcs. */ | 164 | /* used from AST/BAST funcs. */ |
| 165 | enum ocfs2_ast_action l_action; | 165 | enum ocfs2_ast_action l_action; |
diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c index c4cedff365df..fa9dd79c3615 100644 --- a/fs/ocfs2/stack_o2cb.c +++ b/fs/ocfs2/stack_o2cb.c | |||
| @@ -161,7 +161,7 @@ static int dlm_status_to_errno(enum dlm_status status) | |||
| 161 | 161 | ||
| 162 | static void o2dlm_lock_ast_wrapper(void *astarg) | 162 | static void o2dlm_lock_ast_wrapper(void *astarg) |
| 163 | { | 163 | { |
| 164 | union ocfs2_dlm_lksb *lksb = astarg; | 164 | struct ocfs2_dlm_lksb *lksb = astarg; |
| 165 | 165 | ||
| 166 | BUG_ON(o2cb_stack.sp_proto == NULL); | 166 | BUG_ON(o2cb_stack.sp_proto == NULL); |
| 167 | 167 | ||
| @@ -170,7 +170,7 @@ static void o2dlm_lock_ast_wrapper(void *astarg) | |||
| 170 | 170 | ||
| 171 | static void o2dlm_blocking_ast_wrapper(void *astarg, int level) | 171 | static void o2dlm_blocking_ast_wrapper(void *astarg, int level) |
| 172 | { | 172 | { |
| 173 | union ocfs2_dlm_lksb *lksb = astarg; | 173 | struct ocfs2_dlm_lksb *lksb = astarg; |
| 174 | 174 | ||
| 175 | BUG_ON(o2cb_stack.sp_proto == NULL); | 175 | BUG_ON(o2cb_stack.sp_proto == NULL); |
| 176 | 176 | ||
| @@ -179,7 +179,7 @@ static void o2dlm_blocking_ast_wrapper(void *astarg, int level) | |||
| 179 | 179 | ||
| 180 | static void o2dlm_unlock_ast_wrapper(void *astarg, enum dlm_status status) | 180 | static void o2dlm_unlock_ast_wrapper(void *astarg, enum dlm_status status) |
| 181 | { | 181 | { |
| 182 | union ocfs2_dlm_lksb *lksb = astarg; | 182 | struct ocfs2_dlm_lksb *lksb = astarg; |
| 183 | 183 | ||
| 184 | int error = dlm_status_to_errno(status); | 184 | int error = dlm_status_to_errno(status); |
| 185 | 185 | ||
| @@ -204,7 +204,7 @@ static void o2dlm_unlock_ast_wrapper(void *astarg, enum dlm_status status) | |||
| 204 | 204 | ||
| 205 | static int o2cb_dlm_lock(struct ocfs2_cluster_connection *conn, | 205 | static int o2cb_dlm_lock(struct ocfs2_cluster_connection *conn, |
| 206 | int mode, | 206 | int mode, |
| 207 | union ocfs2_dlm_lksb *lksb, | 207 | struct ocfs2_dlm_lksb *lksb, |
| 208 | u32 flags, | 208 | u32 flags, |
| 209 | void *name, | 209 | void *name, |
| 210 | unsigned int namelen) | 210 | unsigned int namelen) |
| @@ -223,7 +223,7 @@ static int o2cb_dlm_lock(struct ocfs2_cluster_connection *conn, | |||
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | static int o2cb_dlm_unlock(struct ocfs2_cluster_connection *conn, | 225 | static int o2cb_dlm_unlock(struct ocfs2_cluster_connection *conn, |
| 226 | union ocfs2_dlm_lksb *lksb, | 226 | struct ocfs2_dlm_lksb *lksb, |
| 227 | u32 flags) | 227 | u32 flags) |
| 228 | { | 228 | { |
| 229 | enum dlm_status status; | 229 | enum dlm_status status; |
| @@ -236,7 +236,7 @@ static int o2cb_dlm_unlock(struct ocfs2_cluster_connection *conn, | |||
| 236 | return ret; | 236 | return ret; |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | static int o2cb_dlm_lock_status(union ocfs2_dlm_lksb *lksb) | 239 | static int o2cb_dlm_lock_status(struct ocfs2_dlm_lksb *lksb) |
| 240 | { | 240 | { |
| 241 | return dlm_status_to_errno(lksb->lksb_o2dlm.status); | 241 | return dlm_status_to_errno(lksb->lksb_o2dlm.status); |
| 242 | } | 242 | } |
| @@ -246,17 +246,17 @@ static int o2cb_dlm_lock_status(union ocfs2_dlm_lksb *lksb) | |||
| 246 | * contents, it will zero out the LVB. Thus the caller can always trust | 246 | * contents, it will zero out the LVB. Thus the caller can always trust |
| 247 | * the contents. | 247 | * the contents. |
| 248 | */ | 248 | */ |
| 249 | static int o2cb_dlm_lvb_valid(union ocfs2_dlm_lksb *lksb) | 249 | static int o2cb_dlm_lvb_valid(struct ocfs2_dlm_lksb *lksb) |
| 250 | { | 250 | { |
| 251 | return 1; | 251 | return 1; |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | static void *o2cb_dlm_lvb(union ocfs2_dlm_lksb *lksb) | 254 | static void *o2cb_dlm_lvb(struct ocfs2_dlm_lksb *lksb) |
| 255 | { | 255 | { |
| 256 | return (void *)(lksb->lksb_o2dlm.lvb); | 256 | return (void *)(lksb->lksb_o2dlm.lvb); |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | static void o2cb_dump_lksb(union ocfs2_dlm_lksb *lksb) | 259 | static void o2cb_dump_lksb(struct ocfs2_dlm_lksb *lksb) |
| 260 | { | 260 | { |
| 261 | dlm_print_one_lock(lksb->lksb_o2dlm.lockid); | 261 | dlm_print_one_lock(lksb->lksb_o2dlm.lockid); |
| 262 | } | 262 | } |
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c index 129b93159cca..31276bac78f5 100644 --- a/fs/ocfs2/stack_user.c +++ b/fs/ocfs2/stack_user.c | |||
| @@ -665,7 +665,7 @@ static void ocfs2_control_exit(void) | |||
| 665 | 665 | ||
| 666 | static void fsdlm_lock_ast_wrapper(void *astarg) | 666 | static void fsdlm_lock_ast_wrapper(void *astarg) |
| 667 | { | 667 | { |
| 668 | union ocfs2_dlm_lksb *lksb = astarg; | 668 | struct ocfs2_dlm_lksb *lksb = astarg; |
| 669 | int status = lksb->lksb_fsdlm.sb_status; | 669 | int status = lksb->lksb_fsdlm.sb_status; |
| 670 | 670 | ||
| 671 | BUG_ON(ocfs2_user_plugin.sp_proto == NULL); | 671 | BUG_ON(ocfs2_user_plugin.sp_proto == NULL); |
| @@ -688,7 +688,7 @@ static void fsdlm_lock_ast_wrapper(void *astarg) | |||
| 688 | 688 | ||
| 689 | static void fsdlm_blocking_ast_wrapper(void *astarg, int level) | 689 | static void fsdlm_blocking_ast_wrapper(void *astarg, int level) |
| 690 | { | 690 | { |
| 691 | union ocfs2_dlm_lksb *lksb = astarg; | 691 | struct ocfs2_dlm_lksb *lksb = astarg; |
| 692 | 692 | ||
| 693 | BUG_ON(ocfs2_user_plugin.sp_proto == NULL); | 693 | BUG_ON(ocfs2_user_plugin.sp_proto == NULL); |
| 694 | 694 | ||
| @@ -697,7 +697,7 @@ static void fsdlm_blocking_ast_wrapper(void *astarg, int level) | |||
| 697 | 697 | ||
| 698 | static int user_dlm_lock(struct ocfs2_cluster_connection *conn, | 698 | static int user_dlm_lock(struct ocfs2_cluster_connection *conn, |
| 699 | int mode, | 699 | int mode, |
| 700 | union ocfs2_dlm_lksb *lksb, | 700 | struct ocfs2_dlm_lksb *lksb, |
| 701 | u32 flags, | 701 | u32 flags, |
| 702 | void *name, | 702 | void *name, |
| 703 | unsigned int namelen) | 703 | unsigned int namelen) |
| @@ -716,7 +716,7 @@ static int user_dlm_lock(struct ocfs2_cluster_connection *conn, | |||
| 716 | } | 716 | } |
| 717 | 717 | ||
| 718 | static int user_dlm_unlock(struct ocfs2_cluster_connection *conn, | 718 | static int user_dlm_unlock(struct ocfs2_cluster_connection *conn, |
| 719 | union ocfs2_dlm_lksb *lksb, | 719 | struct ocfs2_dlm_lksb *lksb, |
| 720 | u32 flags) | 720 | u32 flags) |
| 721 | { | 721 | { |
| 722 | int ret; | 722 | int ret; |
| @@ -726,19 +726,19 @@ static int user_dlm_unlock(struct ocfs2_cluster_connection *conn, | |||
| 726 | return ret; | 726 | return ret; |
| 727 | } | 727 | } |
| 728 | 728 | ||
| 729 | static int user_dlm_lock_status(union ocfs2_dlm_lksb *lksb) | 729 | static int user_dlm_lock_status(struct ocfs2_dlm_lksb *lksb) |
| 730 | { | 730 | { |
| 731 | return lksb->lksb_fsdlm.sb_status; | 731 | return lksb->lksb_fsdlm.sb_status; |
| 732 | } | 732 | } |
| 733 | 733 | ||
| 734 | static int user_dlm_lvb_valid(union ocfs2_dlm_lksb *lksb) | 734 | static int user_dlm_lvb_valid(struct ocfs2_dlm_lksb *lksb) |
| 735 | { | 735 | { |
| 736 | int invalid = lksb->lksb_fsdlm.sb_flags & DLM_SBF_VALNOTVALID; | 736 | int invalid = lksb->lksb_fsdlm.sb_flags & DLM_SBF_VALNOTVALID; |
| 737 | 737 | ||
| 738 | return !invalid; | 738 | return !invalid; |
| 739 | } | 739 | } |
| 740 | 740 | ||
| 741 | static void *user_dlm_lvb(union ocfs2_dlm_lksb *lksb) | 741 | static void *user_dlm_lvb(struct ocfs2_dlm_lksb *lksb) |
| 742 | { | 742 | { |
| 743 | if (!lksb->lksb_fsdlm.sb_lvbptr) | 743 | if (!lksb->lksb_fsdlm.sb_lvbptr) |
| 744 | lksb->lksb_fsdlm.sb_lvbptr = (char *)lksb + | 744 | lksb->lksb_fsdlm.sb_lvbptr = (char *)lksb + |
| @@ -746,7 +746,7 @@ static void *user_dlm_lvb(union ocfs2_dlm_lksb *lksb) | |||
| 746 | return (void *)(lksb->lksb_fsdlm.sb_lvbptr); | 746 | return (void *)(lksb->lksb_fsdlm.sb_lvbptr); |
| 747 | } | 747 | } |
| 748 | 748 | ||
| 749 | static void user_dlm_dump_lksb(union ocfs2_dlm_lksb *lksb) | 749 | static void user_dlm_dump_lksb(struct ocfs2_dlm_lksb *lksb) |
| 750 | { | 750 | { |
| 751 | } | 751 | } |
| 752 | 752 | ||
diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c index 3500d9839d76..8ef9a574315e 100644 --- a/fs/ocfs2/stackglue.c +++ b/fs/ocfs2/stackglue.c | |||
| @@ -240,47 +240,52 @@ EXPORT_SYMBOL_GPL(ocfs2_stack_glue_set_locking_protocol); | |||
| 240 | */ | 240 | */ |
| 241 | int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn, | 241 | int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn, |
| 242 | int mode, | 242 | int mode, |
| 243 | union ocfs2_dlm_lksb *lksb, | 243 | struct ocfs2_dlm_lksb *lksb, |
| 244 | u32 flags, | 244 | u32 flags, |
| 245 | void *name, | 245 | void *name, |
| 246 | unsigned int namelen) | 246 | unsigned int namelen) |
| 247 | { | 247 | { |
| 248 | BUG_ON(lproto == NULL); | 248 | BUG_ON(lproto == NULL); |
| 249 | 249 | ||
| 250 | if (!lksb->lksb_conn) | ||
| 251 | lksb->lksb_conn = conn; | ||
| 252 | else | ||
| 253 | BUG_ON(lksb->lksb_conn != conn); | ||
| 250 | return active_stack->sp_ops->dlm_lock(conn, mode, lksb, flags, | 254 | return active_stack->sp_ops->dlm_lock(conn, mode, lksb, flags, |
| 251 | name, namelen); | 255 | name, namelen); |
| 252 | } | 256 | } |
| 253 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lock); | 257 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lock); |
| 254 | 258 | ||
| 255 | int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, | 259 | int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, |
| 256 | union ocfs2_dlm_lksb *lksb, | 260 | struct ocfs2_dlm_lksb *lksb, |
| 257 | u32 flags) | 261 | u32 flags) |
| 258 | { | 262 | { |
| 259 | BUG_ON(lproto == NULL); | 263 | BUG_ON(lproto == NULL); |
| 264 | BUG_ON(lksb->lksb_conn == NULL); | ||
| 260 | 265 | ||
| 261 | return active_stack->sp_ops->dlm_unlock(conn, lksb, flags); | 266 | return active_stack->sp_ops->dlm_unlock(conn, lksb, flags); |
| 262 | } | 267 | } |
| 263 | EXPORT_SYMBOL_GPL(ocfs2_dlm_unlock); | 268 | EXPORT_SYMBOL_GPL(ocfs2_dlm_unlock); |
| 264 | 269 | ||
| 265 | int ocfs2_dlm_lock_status(union ocfs2_dlm_lksb *lksb) | 270 | int ocfs2_dlm_lock_status(struct ocfs2_dlm_lksb *lksb) |
| 266 | { | 271 | { |
| 267 | return active_stack->sp_ops->lock_status(lksb); | 272 | return active_stack->sp_ops->lock_status(lksb); |
| 268 | } | 273 | } |
| 269 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lock_status); | 274 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lock_status); |
| 270 | 275 | ||
| 271 | int ocfs2_dlm_lvb_valid(union ocfs2_dlm_lksb *lksb) | 276 | int ocfs2_dlm_lvb_valid(struct ocfs2_dlm_lksb *lksb) |
| 272 | { | 277 | { |
| 273 | return active_stack->sp_ops->lvb_valid(lksb); | 278 | return active_stack->sp_ops->lvb_valid(lksb); |
| 274 | } | 279 | } |
| 275 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lvb_valid); | 280 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lvb_valid); |
| 276 | 281 | ||
| 277 | void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb) | 282 | void *ocfs2_dlm_lvb(struct ocfs2_dlm_lksb *lksb) |
| 278 | { | 283 | { |
| 279 | return active_stack->sp_ops->lock_lvb(lksb); | 284 | return active_stack->sp_ops->lock_lvb(lksb); |
| 280 | } | 285 | } |
| 281 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lvb); | 286 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lvb); |
| 282 | 287 | ||
| 283 | void ocfs2_dlm_dump_lksb(union ocfs2_dlm_lksb *lksb) | 288 | void ocfs2_dlm_dump_lksb(struct ocfs2_dlm_lksb *lksb) |
| 284 | { | 289 | { |
| 285 | active_stack->sp_ops->dump_lksb(lksb); | 290 | active_stack->sp_ops->dump_lksb(lksb); |
| 286 | } | 291 | } |
diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h index d699117fb851..bb32926912ba 100644 --- a/fs/ocfs2/stackglue.h +++ b/fs/ocfs2/stackglue.h | |||
| @@ -70,10 +70,14 @@ struct fsdlm_lksb_plus_lvb { | |||
| 70 | * size of the union is known. Lock status structures are embedded in | 70 | * size of the union is known. Lock status structures are embedded in |
| 71 | * ocfs2 inodes. | 71 | * ocfs2 inodes. |
| 72 | */ | 72 | */ |
| 73 | union ocfs2_dlm_lksb { | 73 | struct ocfs2_cluster_connection; |
| 74 | struct dlm_lockstatus lksb_o2dlm; | 74 | struct ocfs2_dlm_lksb { |
| 75 | struct dlm_lksb lksb_fsdlm; | 75 | union { |
| 76 | struct fsdlm_lksb_plus_lvb padding; | 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; | ||
| 77 | }; | 81 | }; |
| 78 | 82 | ||
| 79 | /* | 83 | /* |
| @@ -81,9 +85,9 @@ union ocfs2_dlm_lksb { | |||
| 81 | */ | 85 | */ |
| 82 | struct ocfs2_locking_protocol { | 86 | struct ocfs2_locking_protocol { |
| 83 | struct ocfs2_protocol_version lp_max_version; | 87 | struct ocfs2_protocol_version lp_max_version; |
| 84 | void (*lp_lock_ast)(union ocfs2_dlm_lksb *lksb); | 88 | void (*lp_lock_ast)(struct ocfs2_dlm_lksb *lksb); |
| 85 | void (*lp_blocking_ast)(union ocfs2_dlm_lksb *lksb, int level); | 89 | void (*lp_blocking_ast)(struct ocfs2_dlm_lksb *lksb, int level); |
| 86 | void (*lp_unlock_ast)(union ocfs2_dlm_lksb *lksb, int error); | 90 | void (*lp_unlock_ast)(struct ocfs2_dlm_lksb *lksb, int error); |
| 87 | }; | 91 | }; |
| 88 | 92 | ||
| 89 | 93 | ||
| @@ -161,7 +165,7 @@ struct ocfs2_stack_operations { | |||
| 161 | */ | 165 | */ |
| 162 | int (*dlm_lock)(struct ocfs2_cluster_connection *conn, | 166 | int (*dlm_lock)(struct ocfs2_cluster_connection *conn, |
| 163 | int mode, | 167 | int mode, |
| 164 | union ocfs2_dlm_lksb *lksb, | 168 | struct ocfs2_dlm_lksb *lksb, |
| 165 | u32 flags, | 169 | u32 flags, |
| 166 | void *name, | 170 | void *name, |
| 167 | unsigned int namelen); | 171 | unsigned int namelen); |
| @@ -176,7 +180,7 @@ struct ocfs2_stack_operations { | |||
| 176 | * function. The caller can use this to find their object. | 180 | * function. The caller can use this to find their object. |
| 177 | */ | 181 | */ |
| 178 | int (*dlm_unlock)(struct ocfs2_cluster_connection *conn, | 182 | int (*dlm_unlock)(struct ocfs2_cluster_connection *conn, |
| 179 | union ocfs2_dlm_lksb *lksb, | 183 | struct ocfs2_dlm_lksb *lksb, |
| 180 | u32 flags); | 184 | u32 flags); |
| 181 | 185 | ||
| 182 | /* | 186 | /* |
| @@ -185,17 +189,17 @@ struct ocfs2_stack_operations { | |||
| 185 | * callback pulls out the stack-specific lksb, converts the status | 189 | * callback pulls out the stack-specific lksb, converts the status |
| 186 | * to a proper errno, and returns it. | 190 | * to a proper errno, and returns it. |
| 187 | */ | 191 | */ |
| 188 | int (*lock_status)(union ocfs2_dlm_lksb *lksb); | 192 | int (*lock_status)(struct ocfs2_dlm_lksb *lksb); |
| 189 | 193 | ||
| 190 | /* | 194 | /* |
| 191 | * Return non-zero if the LVB is valid. | 195 | * Return non-zero if the LVB is valid. |
| 192 | */ | 196 | */ |
| 193 | int (*lvb_valid)(union ocfs2_dlm_lksb *lksb); | 197 | int (*lvb_valid)(struct ocfs2_dlm_lksb *lksb); |
| 194 | 198 | ||
| 195 | /* | 199 | /* |
| 196 | * Pull the lvb pointer off of the stack-specific lksb. | 200 | * Pull the lvb pointer off of the stack-specific lksb. |
| 197 | */ | 201 | */ |
| 198 | void *(*lock_lvb)(union ocfs2_dlm_lksb *lksb); | 202 | void *(*lock_lvb)(struct ocfs2_dlm_lksb *lksb); |
| 199 | 203 | ||
| 200 | /* | 204 | /* |
| 201 | * Cluster-aware posix locks | 205 | * Cluster-aware posix locks |
| @@ -212,7 +216,7 @@ struct ocfs2_stack_operations { | |||
| 212 | * This is an optoinal debugging hook. If provided, the | 216 | * This is an optoinal debugging hook. If provided, the |
| 213 | * stack can dump debugging information about this lock. | 217 | * stack can dump debugging information about this lock. |
| 214 | */ | 218 | */ |
| 215 | void (*dump_lksb)(union ocfs2_dlm_lksb *lksb); | 219 | void (*dump_lksb)(struct ocfs2_dlm_lksb *lksb); |
| 216 | }; | 220 | }; |
| 217 | 221 | ||
| 218 | /* | 222 | /* |
| @@ -248,18 +252,18 @@ int ocfs2_cluster_this_node(unsigned int *node); | |||
| 248 | struct ocfs2_lock_res; | 252 | struct ocfs2_lock_res; |
| 249 | int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn, | 253 | int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn, |
| 250 | int mode, | 254 | int mode, |
| 251 | union ocfs2_dlm_lksb *lksb, | 255 | struct ocfs2_dlm_lksb *lksb, |
| 252 | u32 flags, | 256 | u32 flags, |
| 253 | void *name, | 257 | void *name, |
| 254 | unsigned int namelen); | 258 | unsigned int namelen); |
| 255 | int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, | 259 | int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, |
| 256 | union ocfs2_dlm_lksb *lksb, | 260 | struct ocfs2_dlm_lksb *lksb, |
| 257 | u32 flags); | 261 | u32 flags); |
| 258 | 262 | ||
| 259 | int ocfs2_dlm_lock_status(union ocfs2_dlm_lksb *lksb); | 263 | int ocfs2_dlm_lock_status(struct ocfs2_dlm_lksb *lksb); |
| 260 | int ocfs2_dlm_lvb_valid(union ocfs2_dlm_lksb *lksb); | 264 | int ocfs2_dlm_lvb_valid(struct ocfs2_dlm_lksb *lksb); |
| 261 | void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb); | 265 | void *ocfs2_dlm_lvb(struct ocfs2_dlm_lksb *lksb); |
| 262 | void ocfs2_dlm_dump_lksb(union ocfs2_dlm_lksb *lksb); | 266 | void ocfs2_dlm_dump_lksb(struct ocfs2_dlm_lksb *lksb); |
| 263 | 267 | ||
| 264 | int ocfs2_stack_supports_plocks(void); | 268 | int ocfs2_stack_supports_plocks(void); |
| 265 | int ocfs2_plock(struct ocfs2_cluster_connection *conn, u64 ino, | 269 | int ocfs2_plock(struct ocfs2_cluster_connection *conn, u64 ino, |
