• jiangyiwen's avatar
    ocfs2/dlm: wait until DLM_LOCK_RES_SETREF_INPROG is cleared in dlm_deref_lockres_worker · b5560143
    jiangyiwen authored
    Commit f3f85464 ("ocfs2_dlm: Ensure correct ordering of set/clear
    refmap bit on lockres") still exists a race which can't ensure the
    ordering is exactly correct.
    
    Node1               Node2                    Node3
    umount, migrate
    lockres to Node2
                        migrate finished,
                        send migrate request
                        to Node3
                                                  received migrate request,
                                                  create a migration_mle,
                                                  respond to Node2.
                        set DLM_LOCK_RES_SETREF_INPROG
                        and send assert master to
                        Node3
                                                  delete migration_mle in
                                                  assert_master_handler,
                                                  Node3 umount without response
                                                  dlm_thread purge
                                                  this lockres, send drop
                                                  deref message to Node2
                        found the flag of
                        DLM_LOCK_RES_SETREF_INPROG
                        is set, dispatch
                        dlm_deref_lockres_worker to
                        clear refmap, but in function of
                        dlm_deref_lockres_worker,
                        only if node in refmap it wait
                        DLM_LOCK_RES_SETREF_INPROG
                        to be cleared. So worker is
                        done successfully
    
                                                  purge lockres, send
                                                  assert master response
                                                  to Node1, and finish umount
                        set Node3 in refmap, and it
                        won't be cleared forever, thus
                        lead to umount hung
    
    so wait until DLM_LOCK_RES_SETREF_INPROG is cleared in
    dlm_deref_lockres_worker.
    Signed-off-by: 's avatarYiwen Jiang <jiangyiwen@huawei.com>
    Reviewed-by: 's avatarJoseph Qi <joseph.qi@huawei.com>
    Reviewed-by: 's avatarJunxiao Bi <junxiao.bi@oracle.com>
    Cc: Mark Fasheh <mfasheh@suse.de>
    Cc: Joel Becker <jlbec@evilplan.org>
    Signed-off-by: 's avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: 's avatarLinus Torvalds <torvalds@linux-foundation.org>
    b5560143
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
REPORTING-BUGS Loading commit data...