OSDN Git Service

ocfs2/dlm: avoid incorrect bit set in refmap on recovery master
authorWengang Wang <wen.gang.wang@oracle.com>
Fri, 30 Jul 2010 08:14:44 +0000 (16:14 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:45:47 +0000 (16:45 -0700)
commitd79caba7b9f51221576fb4afe7dc0e165bdd0485
tree8c3bdc50f0d725fb7c18fac76008c61428274082
parent6d4ff3b0d4438f1d3707720299c32aa7715a4317
ocfs2/dlm: avoid incorrect bit set in refmap on recovery master

commit a524812b7eaa7783d7811198921100f079034e61 upstream.

In the following situation, there remains an incorrect bit in refmap on the
recovery master. Finally the recovery master will fail at purging the lockres
due to the incorrect bit in refmap.

1) node A has no interest on lockres A any longer, so it is purging it.
2) the owner of lockres A is node B, so node A is sending de-ref message
to node B.
3) at this time, node B crashed. node C becomes the recovery master. it recovers
lockres A(because the master is the dead node B).
4) node A migrated lockres A to node C with a refbit there.
5) node A failed to send de-ref message to node B because it crashed. The failure
is ignored. no other action is done for lockres A any more.

For mormal, re-send the deref message to it to recovery master can fix it. Well,
ignoring the failure of deref to the original master and not recovering the lockres
to recovery master has the same effect. And the later is simpler.

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Acked-by: Srinivas Eeda <srinivas.eeda@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ocfs2/dlm/dlmrecovery.c
fs/ocfs2/dlm/dlmthread.c