ocfs2: Ignore BASTs fired after an AST for a drop lock
PATCH 1/1 ocfs2: Ignore BASTs fired after an AST for a drop lock
dlmglue should ignore BASTs fired after an AST for a drop lock.
Reported-by David Teigland <[email protected]>
Signed-off-by Sunil Mushran <[email protected]>
--- fs/ocfs2/dlmglue.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-)
fs/ocfs2/dlmglue.c +7 -4
@@ -920,8 +920,10 @@ static int ocfs2_generic_handle_bast(struct ocfs2_lock_res *lockres,* one that goes low enough to satisfy the level we're * blocking. this also catches the case where we get * duplicate BASTs */ -if (ocfs2_highest_compat_lock_level (level) < -ocfs2_highest_compat_lock_level (lockres->l_blocking)) +if ((ocfs2_highest_compat_lock_level (level) < + lockres->l_level) && + (ocfs2_highest_compat_lock_level (level) < +ocfs2_highest_compat_lock_level (lockres->l_blocking))) needs_downconvert =1 ; lockres->l_blocking = level;
@@ -3478,9 +3480,10 @@ recheck:/* * How can we block and yet be at NL? We were trying to upconvert * from NL and got canceled. The code comes back here, and now -* we notice and clear BLOCKING. +* we notice and clear BLOCKING. It could be IV if the unlock ast +* for the drop lock was received before the bast. */ -if (lockres->l_level ==DLM_LOCK_NL ) { +if (lockres->l_level <=DLM_LOCK_NL ) {BUG_ON (lockres->l_ex_holders || lockres->l_ro_holders);mlog (ML_NOTICE ,"lock %s, Aborting dc\n" , lockres->l_name); lockres->l_blocking =DLM_LOCK_NL ;
Signature · 1 line
1.6.3.3