diff options
| author | xuejiufei <[email protected]> | 2015-12-29 22:54:29 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2015-12-30 01:45:49 +0000 |
| commit | cc28d6d80f6ab494b10f0e2ec949eacd610f66e3 (patch) | |
| tree | cc6c8afe205b8db98fa11dcf7c3c853994d7218e | |
| parent | mm/memory_hotplug.c: check for missing sections in test_pages_in_a_zone() (diff) | |
| download | kernel-cc28d6d80f6ab494b10f0e2ec949eacd610f66e3.tar.gz kernel-cc28d6d80f6ab494b10f0e2ec949eacd610f66e3.zip | |
ocfs2/dlm: clear migration_pending when migration target goes down
We have found a BUG on res->migration_pending when migrating lock
resources. The situation is as follows.
dlm_mark_lockres_migration
res->migration_pending = 1;
__dlm_lockres_reserve_ast
dlm_lockres_release_ast returns with res->migration_pending remains
because other threads reserve asts
wait dlm_migration_can_proceed returns 1
>>>>>>> o2hb found that target goes down and remove target
from domain_map
dlm_migration_can_proceed returns 1
dlm_mark_lockres_migrating returns -ESHOTDOWN with
res->migration_pending still remains.
When reentering dlm_mark_lockres_migrating(), it will trigger the BUG_ON
with res->migration_pending. So clear migration_pending when target is
down.
Signed-off-by: Jiufei Xue <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
| -rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index ce38b4ccc9ab..84f2f8079466 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c @@ -2843,6 +2843,8 @@ again: res->state &= ~DLM_LOCK_RES_BLOCK_DIRTY; if (!ret) BUG_ON(!(res->state & DLM_LOCK_RES_MIGRATING)); + else + res->migration_pending = 0; spin_unlock(&res->spinlock); /* |
