Revision ac7cf246dfdbec3d8fed296c7bf30e16f5099dac authored by Joseph Qi on 25 March 2016, 21:21:26 UTC, committed by Linus Torvalds on 25 March 2016, 23:37:42 UTC
There is a race window between dlmconvert_remote and dlm_move_lockres_to_recovery_list, which will cause a lock with OCFS2_LOCK_BUSY in grant list, thus system hangs. dlmconvert_remote { spin_lock(&res->spinlock); list_move_tail(&lock->list, &res->converting); lock->convert_pending = 1; spin_unlock(&res->spinlock); status = dlm_send_remote_convert_request(); >>>>>> race window, master has queued ast and return DLM_NORMAL, and then down before sending ast. this node detects master down and calls dlm_move_lockres_to_recovery_list, which will revert the lock to grant list. Then OCFS2_LOCK_BUSY won't be cleared as new master won't send ast any more because it thinks already be authorized. spin_lock(&res->spinlock); lock->convert_pending = 0; if (status != DLM_NORMAL) dlm_revert_pending_convert(res, lock); spin_unlock(&res->spinlock); } In this case, check if res->state has DLM_LOCK_RES_RECOVERING bit set (res is still in recovering) or res master changed (new master has finished recovery), reset the status to DLM_RECOVERING, then it will retry convert. Signed-off-by: Joseph Qi <joseph.qi@huawei.com> Reported-by: Yiwen Jiang <jiangyiwen@huawei.com> Reviewed-by: Junxiao Bi <junxiao.bi@oracle.com> Cc: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Cc: Tariq Saeed <tariq.x.saeed@oracle.com> 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>
1 parent 2888868
File | Mode | Size |
---|---|---|
postprocess | ||
coresight.txt | -rw-r--r-- | 14.7 KB |
events-kmem.txt | -rw-r--r-- | 5.3 KB |
events-msr.txt | -rw-r--r-- | 700 bytes |
events-nmi.txt | -rw-r--r-- | 1.5 KB |
events-power.txt | -rw-r--r-- | 3.4 KB |
events.txt | -rw-r--r-- | 17.1 KB |
ftrace-design.txt | -rw-r--r-- | 14.0 KB |
ftrace.txt | -rw-r--r-- | 107.0 KB |
function-graph-fold.vim | -rw-r--r-- | 1.3 KB |
intel_th.txt | -rw-r--r-- | 3.6 KB |
kprobetrace.txt | -rw-r--r-- | 6.9 KB |
mmiotrace.txt | -rw-r--r-- | 6.6 KB |
ring-buffer-design.txt | -rw-r--r-- | 29.9 KB |
stm.txt | -rw-r--r-- | 3.8 KB |
tracepoint-analysis.txt | -rw-r--r-- | 12.0 KB |
tracepoints.txt | -rw-r--r-- | 5.1 KB |
uprobetracer.txt | -rw-r--r-- | 6.3 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...