[Ocfs2-commits] khackel commits r2218 - trunk/fs/ocfs2/dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed May 4 17:35:59 CDT 2005
Author: khackel
Signed-off-by: mfasheh
Date: 2005-05-04 17:35:58 -0500 (Wed, 04 May 2005)
New Revision: 2218
Modified:
trunk/fs/ocfs2/dlm/dlmunlock.c
Log:
* fixes bug 392. was failing to clear lock->ml.convert type on a LKM_CANCEL
Signed-off-by: mfasheh
Modified: trunk/fs/ocfs2/dlm/dlmunlock.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmunlock.c 2005-05-04 01:57:10 UTC (rev 2217)
+++ trunk/fs/ocfs2/dlm/dlmunlock.c 2005-05-04 22:35:58 UTC (rev 2218)
@@ -50,10 +50,11 @@
#define MLOG_MASK_PREFIX ML_DLM
#include "cluster/masklog.h"
-#define DLM_UNLOCK_FREE_LOCK 0x00000001
-#define DLM_UNLOCK_CALL_AST 0x00000002
-#define DLM_UNLOCK_REMOVE_LOCK 0x00000004
-#define DLM_UNLOCK_REGRANT_LOCK 0x00000008
+#define DLM_UNLOCK_FREE_LOCK 0x00000001
+#define DLM_UNLOCK_CALL_AST 0x00000002
+#define DLM_UNLOCK_REMOVE_LOCK 0x00000004
+#define DLM_UNLOCK_REGRANT_LOCK 0x00000008
+#define DLM_UNLOCK_CLEAR_CONVERT_TYPE 0x00000010
static dlm_status dlm_get_cancel_actions(dlm_ctxt *dlm, dlm_lock_resource *res,
@@ -175,12 +176,21 @@
dlm_lock_get(lock);
list_add_tail(&lock->list, &res->granted);
}
+ if (actions & DLM_UNLOCK_CLEAR_CONVERT_TYPE) {
+ mlog(0, "clearing convert_type at %smaster node\n",
+ master_node ? "" : "non-");
+ lock->ml.convert_type = LKM_IVMODE;
+ }
/* remove the extra ref on lock */
dlm_lock_put(lock);
leave:
res->state &= ~DLM_LOCK_RES_IN_PROGRESS;
+ if (!dlm_lock_on_list(&res->converting, lock))
+ DLM_ASSERT(lock->ml.convert_type == LKM_IVMODE);
+ else
+ DLM_ASSERT(lock->ml.convert_type != LKM_IVMODE);
spin_unlock(&lock->spinlock);
spin_unlock(&res->spinlock);
wake_up(&res->wq);
@@ -447,7 +457,8 @@
status = DLM_NORMAL;
*actions = (DLM_UNLOCK_CALL_AST |
DLM_UNLOCK_REMOVE_LOCK |
- DLM_UNLOCK_REGRANT_LOCK);
+ DLM_UNLOCK_REGRANT_LOCK |
+ DLM_UNLOCK_CLEAR_CONVERT_TYPE);
} else if (dlm_lock_on_list(&res->granted, lock)) {
/* too late, already granted. DLM_CANCELGRANT */
lksb->status = DLM_CANCELGRANT;
More information about the Ocfs2-commits
mailing list