remarkable-linux/fs/ocfs2
Xue jiufei 69b2bd16d9 ocfs2/dlm: force clean refmap when doing local cleanup
dlm_do_local_recovery_cleanup() should force clean refmap if the owner of
lockres is UNKNOWN.  Otherwise node may hang when umounting filesystems.
Here's the situation:

	Node1                                    Node2
dlmlock()
  -> dlm_get_lock_resource()
send DLM_MASTER_REQUEST_MSG to
other nodes.

                                       trying to master this lockres,
                                       return MAYBE.

selected as the master of lockresA,
set mle->master to Node1,
and do assert_master,
send DLM_ASSERT_MASTER_MSG to Node2.
                                       Node 2 has interest on lockresA
                                       and return
                                       DLM_ASSERT_RESPONSE_MASTERY_REF
                                       then something happened and
                                       Node2 crashed.

Receiving DLM_ASSERT_RESPONSE_MASTERY_REF, set Node2 into refmap, and keep
sending DLM_ASSERT_MASTER_MSG to other nodes

o2hb found node2 down, calling dlm_hb_node_down() -->
dlm_do_local_recovery_cleanup() the master of lockresA is still UNKNOWN,
no need to call dlm_free_dead_locks().

Set the master of lockresA to Node1, but Node2 stills remains in refmap.

When Node1 umount, it found that the refmap of lockresA is not empty and
attempted to migrate it to Node2, But Node2 is already down, so umount
hang, trying to migrate lockresA again and again.

Signed-off-by: joyce <xuejiufei@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-09-11 15:56:49 -07:00
..
cluster ocfs2: use list_for_each_entry() instead of list_for_each() 2013-09-11 15:56:36 -07:00
dlm ocfs2/dlm: force clean refmap when doing local cleanup 2013-09-11 15:56:49 -07:00
dlmfs fs: Limit sys_mount to only request filesystem modules. 2013-03-03 19:36:31 -08:00
acl.c ocfs2: clean up dead code in ocfs2_acl_from_xattr() 2013-09-11 15:56:39 -07:00
acl.h
alloc.c ocfs2: fix mutex_unlock and possible memory leak in ocfs2_remove_btree_range 2013-07-03 16:07:23 -07:00
alloc.h
aops.c ocfs2: use i_size_read() to access i_size 2013-09-11 15:56:30 -07:00
aops.h aio: don't include aio.h in sched.h 2013-05-07 20:16:25 -07:00
blockcheck.c
blockcheck.h
buffer_head_io.c
buffer_head_io.h
dcache.c
dcache.h
dir.c ocfs2: fix null pointer dereference in ocfs2_dir_foreach_blk_id() 2013-08-13 17:57:49 -07:00
dir.h [readdir] convert ocfs2 2013-06-29 12:57:02 +04:00
dlmglue.c aio: remove retry-based AIO 2013-05-07 18:38:27 -07:00
dlmglue.h
export.c
export.h
extent_map.c ocfs2: use i_size_read() to access i_size 2013-09-11 15:56:30 -07:00
extent_map.h
file.c ocfs2: lighten up allocate transaction 2013-09-11 15:56:28 -07:00
file.h
heartbeat.c
heartbeat.h
inode.c
inode.h aio: don't include aio.h in sched.h 2013-05-07 20:16:25 -07:00
ioctl.c ocfs2: use i_size_read() to access i_size 2013-09-11 15:56:30 -07:00
ioctl.h
journal.c ocfs2: use i_size_read() to access i_size 2013-09-11 15:56:30 -07:00
journal.h ocfs2: lighten up allocate transaction 2013-09-11 15:56:28 -07:00
Kconfig
localalloc.c ocfs2: ac_bits_wanted should be local_alloc_bits when returns -ENOSPC 2013-09-11 15:56:31 -07:00
localalloc.h
locks.c
locks.h
Makefile
mmap.c
mmap.h
move_extents.c ocfs2: fix a memory leak in __ocfs2_move_extents() 2013-09-11 15:56:44 -07:00
move_extents.h
namei.c ocfs2: fix readonly issue in ocfs2_unlink() 2013-07-03 16:07:24 -07:00
namei.h
ocfs1_fs_compat.h
ocfs2.h ocfs2: remove unecessary variable needs_checkpoint 2013-07-03 16:07:23 -07:00
ocfs2_fs.h
ocfs2_ioctl.h
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h ocfs2: lighten up allocate transaction 2013-09-11 15:56:28 -07:00
quota.h
quota_global.c ocfs2: use i_size_read() to access i_size 2013-09-11 15:56:30 -07:00
quota_local.c ocfs2: use i_size_read() to access i_size 2013-09-11 15:56:30 -07:00
refcounttree.c ocfs2: add missing return value check of ocfs2_get_clusters() 2013-09-11 15:56:44 -07:00
refcounttree.h ocfs2: fix NULL pointer dereference in ocfs2_duplicate_clusters_by_page 2013-08-13 17:57:49 -07:00
reservations.c
reservations.h
resize.c
resize.h
slot_map.c
slot_map.h
stack_o2cb.c
stack_user.c
stackglue.c
stackglue.h
suballoc.c ocfs2: remove duplicated mlog_errno() in ocfs2_relink_block_group 2013-07-03 16:07:24 -07:00
suballoc.h
super.c fs/ocfs2/super.c: Use bigger nodestr to accomodate 32-bit node numbers 2013-08-28 19:26:38 -07:00
super.h
symlink.c
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
ver.c
ver.h
xattr.c ocfs2: free meta_ac and data_ac when ocfs2_start_trans fails in ocfs2_xattr_set() 2013-09-11 15:56:47 -07:00
xattr.h xattr: Constify ->name member of "struct xattr". 2013-07-25 19:30:03 +10:00