[Ocfs2-commits] khackel commits r2696 - trunk/fs/ocfs2/dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Nov 10 13:56:59 CST 2005
Author: khackel
Signed-off-by: mfasheh
Date: 2005-11-10 13:56:57 -0600 (Thu, 10 Nov 2005)
New Revision: 2696
Modified:
trunk/fs/ocfs2/dlm/dlmast.c
Log:
* Fixes bug 517: Hang during unmount, but not the parallel umount bug (572)
* during umount, all lock resources must be migrated to other nodes. migration
pauses and waits for all ASTs and BASTs to flush. the ASTs use a reservation-
based system, and the reservation count was one too high in this particular
case (any time a BAST was cancelled because it was obsoleted by an AST)
Signed-off-by: mfasheh
Modified: trunk/fs/ocfs2/dlm/dlmast.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmast.c 2005-11-09 23:58:30 UTC (rev 2695)
+++ trunk/fs/ocfs2/dlm/dlmast.c 2005-11-10 19:56:57 UTC (rev 2696)
@@ -114,9 +114,22 @@
/* check to see if this ast obsoletes the bast */
if (dlm_should_cancel_bast(dlm, lock)) {
+ struct dlm_lock_resource *res = lock->lockres;
+ mlog(0, "%s: cancelling bast for %.*s\n",
+ dlm->name, res->lockname.len, res->lockname.name);
lock->bast_pending = 0;
list_del_init(&lock->bast_list);
lock->ml.highest_blocked = LKM_IVMODE;
+ /* removing lock from list, remove a ref. guaranteed
+ * this won't be the last ref because of the get above,
+ * so res->spinlock will not be taken here */
+ dlm_lock_put(lock);
+ /* free up the reserved bast that we are cancelling.
+ * guaranteed that this will not be the last reserved
+ * ast because *both* an ast and a bast were reserved
+ * to get to this point. the res->spinlock will not be
+ * taken here */
+ dlm_lockres_release_ast(dlm, res);
}
list_add_tail(&lock->ast_list, &dlm->pending_asts);
lock->ast_pending = 1;
More information about the Ocfs2-commits
mailing list