[Ocfs2-commits] khackel commits r2097 - trunk/fs/ocfs2/dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Mar 31 01:00:23 CST 2005
Author: khackel
Signed-off-by: mfasheh
Date: 2005-03-31 01:00:21 -0600 (Thu, 31 Mar 2005)
New Revision: 2097
Modified:
trunk/fs/ocfs2/dlm/dlmthread.c
Log:
* fixes a bug in dlm_flush_asts that would blindly clear the
ast_pending flag on a lock even if another ast was queued
on the same lock while the spinlock was dropped
Signed-off-by: mfasheh
Md5sum: b64f4f4b8b8cf5852f6f23bb2950e19c
Date: Mar 30 17:04
Size: 1276430
Matched-on: /build/khackel/ocfs/trunk/fs/ocfs2/dlm ca-test32 ca-test33
Test-output-node1: /var/crash/139.185.118.132-2005-03-30-17\:58/log
Test-output-node2: /var/crash/139.185.118.133-2005-03-30-17\:58/log
Modified: trunk/fs/ocfs2/dlm/dlmthread.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmthread.c 2005-03-31 02:23:39 UTC (rev 2096)
+++ trunk/fs/ocfs2/dlm/dlmthread.c 2005-03-31 07:00:21 UTC (rev 2097)
@@ -445,7 +445,10 @@
dlmprintk0("delivering an ast for this lockres\n");
DLM_ASSERT(lock->ast_pending);
+ spin_lock(&lock->spinlock);
list_del_init(&lock->ast_list);
+ spin_unlock(&lock->spinlock);
+
if (lock->ml.node != dlm->node_num) {
if (dlm_do_remote_ast(dlm, res, lock) < 0)
dlmprintk("eek\n");
@@ -453,7 +456,14 @@
dlm_do_local_ast(dlm, res, lock);
spin_lock(&lock->spinlock);
- lock->ast_pending = 0;
+ /* possible that another ast was queued while
+ * we were delivering the last one */
+ if (!list_empty(&lock->ast_list)) {
+ dlmprintk0("aha another ast got queued while "
+ "we were finishing the last one. will "
+ "keep the ast_pending flag set.\n");
+ } else
+ lock->ast_pending = 0;
spin_unlock(&lock->spinlock);
}
@@ -468,9 +478,9 @@
DLM_ASSERT(lock->ml.highest_blocked > LKM_IVMODE);
hi = lock->ml.highest_blocked;
lock->ml.highest_blocked = LKM_IVMODE;
- spin_unlock(&lock->spinlock);
list_del_init(&lock->bast_list);
+ spin_unlock(&lock->spinlock);
dlmprintk("delivering a bast for this lockres "
"(blocked = %d\n", hi);
@@ -481,7 +491,14 @@
dlm_do_local_bast(dlm, res, lock, hi);
spin_lock(&lock->spinlock);
- lock->bast_pending = 0;
+ /* possible that another bast was queued while
+ * we were delivering the last one */
+ if (!list_empty(&lock->bast_list)) {
+ dlmprintk0("aha another bast got queued while "
+ "we were finishing the last one. will "
+ "keep the bast_pending flag set.\n");
+ } else
+ lock->bast_pending = 0;
spin_unlock(&lock->spinlock);
}
}
More information about the Ocfs2-commits
mailing list