Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185455
b: refs/heads/master
c: 110946c
h: refs/heads/master
i:
  185453: 157e080
  185451: bbc82cb
  185447: 40bad28
  185439: a227f58
v: v3
  • Loading branch information
Joel Becker committed Feb 26, 2010
1 parent ad94535 commit 427251c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c0e4133851ed94c73ee3d34a2f2a245fcd0a60a1
refs/heads/master: 110946c8fb23c1e1e23312afed0977ad4aa37c95
15 changes: 4 additions & 11 deletions trunk/fs/ocfs2/stack_o2cb.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,28 +163,21 @@ static void o2dlm_lock_ast_wrapper(void *astarg)
{
struct ocfs2_dlm_lksb *lksb = astarg;

BUG_ON(o2cb_stack.sp_proto == NULL);

o2cb_stack.sp_proto->lp_lock_ast(lksb);
lksb->lksb_conn->cc_proto->lp_lock_ast(lksb);
}

static void o2dlm_blocking_ast_wrapper(void *astarg, int level)
{
struct ocfs2_dlm_lksb *lksb = astarg;

BUG_ON(o2cb_stack.sp_proto == NULL);

o2cb_stack.sp_proto->lp_blocking_ast(lksb, level);
lksb->lksb_conn->cc_proto->lp_blocking_ast(lksb, level);
}

static void o2dlm_unlock_ast_wrapper(void *astarg, enum dlm_status status)
{
struct ocfs2_dlm_lksb *lksb = astarg;

int error = dlm_status_to_errno(status);

BUG_ON(o2cb_stack.sp_proto == NULL);

/*
* In o2dlm, you can get both the lock_ast() for the lock being
* granted and the unlock_ast() for the CANCEL failing. A
Expand All @@ -199,7 +192,7 @@ static void o2dlm_unlock_ast_wrapper(void *astarg, enum dlm_status status)
if (status == DLM_CANCELGRANT)
return;

o2cb_stack.sp_proto->lp_unlock_ast(lksb, error);
lksb->lksb_conn->cc_proto->lp_unlock_ast(lksb, error);
}

static int o2cb_dlm_lock(struct ocfs2_cluster_connection *conn,
Expand Down Expand Up @@ -284,7 +277,7 @@ static int o2cb_cluster_connect(struct ocfs2_cluster_connection *conn)
struct dlm_protocol_version fs_version;

BUG_ON(conn == NULL);
BUG_ON(o2cb_stack.sp_proto == NULL);
BUG_ON(conn->cc_proto == NULL);

/* for now we only have one cluster/node, make sure we see it
* in the heartbeat universe */
Expand Down
10 changes: 3 additions & 7 deletions trunk/fs/ocfs2/stack_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,6 @@ static void fsdlm_lock_ast_wrapper(void *astarg)
struct ocfs2_dlm_lksb *lksb = astarg;
int status = lksb->lksb_fsdlm.sb_status;

BUG_ON(ocfs2_user_plugin.sp_proto == NULL);

/*
* For now we're punting on the issue of other non-standard errors
* where we can't tell if the unlock_ast or lock_ast should be called.
Expand All @@ -681,18 +679,16 @@ static void fsdlm_lock_ast_wrapper(void *astarg)
*/

if (status == -DLM_EUNLOCK || status == -DLM_ECANCEL)
ocfs2_user_plugin.sp_proto->lp_unlock_ast(lksb, 0);
lksb->lksb_conn->cc_proto->lp_unlock_ast(lksb, 0);
else
ocfs2_user_plugin.sp_proto->lp_lock_ast(lksb);
lksb->lksb_conn->cc_proto->lp_lock_ast(lksb);
}

static void fsdlm_blocking_ast_wrapper(void *astarg, int level)
{
struct ocfs2_dlm_lksb *lksb = astarg;

BUG_ON(ocfs2_user_plugin.sp_proto == NULL);

ocfs2_user_plugin.sp_proto->lp_blocking_ast(lksb, level);
lksb->lksb_conn->cc_proto->lp_blocking_ast(lksb, level);
}

static int user_dlm_lock(struct ocfs2_cluster_connection *conn,
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ocfs2/stackglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ int ocfs2_cluster_connect(const char *stack_name,
new_conn->cc_recovery_handler = recovery_handler;
new_conn->cc_recovery_data = recovery_data;

new_conn->cc_proto = lproto;
/* Start the new connection at our maximum compatibility level */
new_conn->cc_version = lproto->lp_max_version;

Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ocfs2/stackglue.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ struct ocfs2_cluster_connection {
char cc_name[GROUP_NAME_MAX];
int cc_namelen;
struct ocfs2_protocol_version cc_version;
struct ocfs2_locking_protocol *cc_proto;
void (*cc_recovery_handler)(int node_num, void *recovery_data);
void *cc_recovery_data;
void *cc_lockspace;
Expand Down

0 comments on commit 427251c

Please sign in to comment.