]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ocfs2/dlm: ignore cleaning the migration mle that is inuse
authorxuejiufei <xuejiufei@huawei.com>
Thu, 14 Jan 2016 23:17:38 +0000 (15:17 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:44:16 +0000 (15:44 -0700)
commit66341db052757d6db6869a4b887960ca64f8ecfa
tree48f6d6aff514937c1073ebfe4a9ccaf4833b18e3
parent927d6d5ab153eb9f72a2d82c7f497d52532a87d4
ocfs2/dlm: ignore cleaning the migration mle that is inuse

Orabug: 23330634

[ Upstream commit bef5502de074b6f6fa647b94b73155d675694420 ]

We have found that migration source will trigger a BUG that the refcount
of mle is already zero before put when the target is down during
migration.  The situation is as follows:

dlm_migrate_lockres
  dlm_add_migration_mle
  dlm_mark_lockres_migrating
  dlm_get_mle_inuse
  <<<<<< Now the refcount of the mle is 2.
  dlm_send_one_lockres and wait for the target to become the
  new master.
  <<<<<< o2hb detect the target down and clean the migration
  mle. Now the refcount is 1.

dlm_migrate_lockres woken, and put the mle twice when found the target
goes down which trigger the BUG with the following message:

  "ERROR: bad mle: ".

Signed-off-by: Jiufei Xue <xuejiufei@huawei.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 8467278d965a3c2c2f2e95c8eb723f47b872ad5d)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
fs/ocfs2/dlm/dlmmaster.c