ocfs2: fix cluster hang after a node dies
authorChangwei Ge <[email protected]>
Thu, 16 Nov 2017 01:31:33 +0000 (17:31 -0800)
committerLinus Torvalds <[email protected]>
Thu, 16 Nov 2017 02:21:01 +0000 (18:21 -0800)
commit1c01967116a678fed8e2c68a6ab82abc8effeddc
tree67ba7af54c7234d421bfb8076493b424dc79afc6
parent98d6c09ec2899a9a601b16ec7ae31d54e6b100b9
ocfs2: fix cluster hang after a node dies

When a node dies, other live nodes have to choose a new master for an
existed lock resource mastered by the dead node.

As for ocfs2/dlm implementation, this is done by function -
dlm_move_lockres_to_recovery_list which marks those lock rsources as
DLM_LOCK_RES_RECOVERING and manages them via a list from which DLM
changes lock resource's master later.

So without invoking dlm_move_lockres_to_recovery_list, no master will be
choosed after dlm recovery accomplishment since no lock resource can be
found through ::resource list.

What's worse is that if DLM_LOCK_RES_RECOVERING is not marked for lock
resources mastered a dead node, it will break up synchronization among
nodes.

So invoke dlm_move_lockres_to_recovery_list again.

Fixs: 'commit ee8f7fcbe638 ("ocfs2/dlm: continue to purge recovery lockres when recovery master goes down")'
Link: http://lkml.kernel.org/r/63ADC13FD55D6546B7DECE290D39E373CED6E0F9@H3CMLB14-EX.srv.huawei-3com.com
Signed-off-by: Changwei Ge <[email protected]>
Reported-by: Vitaly Mayatskih <[email protected]>
Tested-by: Vitaly Mayatskikh <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Joseph Qi <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/ocfs2/dlm/dlmrecovery.c