* [Ocfs2-devel] [PATCH] ocfs2: fix BUG_ON(res->migration_pending) in dlm_mark_lockres_migrating
@ 2012-12-21 10:29 Xue jiufei
0 siblings, 0 replies; only message in thread
From: Xue jiufei @ 2012-12-21 10:29 UTC (permalink / raw)
To: ocfs2-devel
When dlm_lockres_release_ast() returns without clearing
res->migration_pending, dlm_mark_lockres_migrating() exits abnormally
with res->migration_pending setting to 1. When reentering
dlm_mark_lockres_migrating(), it will trigger the BUG_ON with
res->migration_pending. Clearing migration_pending when target is
down can resolve this issue.
Signed-off-by: xuejiufei <xuejiufei@huawei.com>
---
fs/ocfs2/dlm/dlmmaster.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 005261c..c491f97 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -2751,6 +2751,9 @@ again:
if (!test_bit(target, dlm->domain_map)) {
mlog(ML_ERROR, "aha. migration target %u just went down\n",
target);
+ spin_lock(&res->spinlock);
+ res->migration_pending = 0;
+ spin_unlock(&res->spinlock);
ret = -EHOSTDOWN;
}
spin_unlock(&dlm->spinlock);
--
1.7.8.6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-12-21 10:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-21 10:29 [Ocfs2-devel] [PATCH] ocfs2: fix BUG_ON(res->migration_pending) in dlm_mark_lockres_migrating Xue jiufei
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.