alistair23-linux/fs/ocfs2
xuejiufei e5054c9aef ocfs2/dlm: move lock to the tail of grant queue while doing in-place convert
We have found a bug when two nodes doing umount one after another.

1) Node 1 migrate a lockres that has 3 locks in grant queue such as
   N2(PR)<->N3(NL)<->N4(PR) to N2.  After migration, lvb of the lock
   N3(NL) and N4(PR) are empty on node 2 because migration target do not
   copy lvb to these two lock.

2) Node 3 want to convert to PR, it can be granted in
   __dlmconvert_master(), and the order of these locks is unchanged.  The
   lvb of the lock N3(PR) on node 2 is copyed from lockres in function
   dlm_update_lvb() while the lvb of lock N4(PR) is still empty.

3) Node 2 want to leave domain, it will migrate this lockres to node 3.
   Then node 2 will trigger the BUG in dlm_prepare_lvb_for_migration()
   when adding the lock N4(PR) to mres with the following message because
   the lvb of mres is already copied from lock N3(PR), but the lvb of lock
   N4(PR) is empty.

"Mismatched lvb in lock cookie=%u:%llu, name=%.*s, node=%u"

[akpm@linux-foundation.org: tweak comment]
Signed-off-by: xuejiufei <xuejiufei@huawei.com>
Acked-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-03-25 16:37:42 -07:00
..
cluster ocfs2: o2hb: fix double free bug 2016-03-25 16:37:42 -07:00
dlm ocfs2/dlm: move lock to the tail of grant queue while doing in-place convert 2016-03-25 16:37:42 -07:00
dlmfs kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
acl.c
acl.h
alloc.c ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local 2016-03-25 16:37:42 -07:00
alloc.h ocfs2: constify ocfs2_extent_tree_operations structures 2016-01-14 16:00:49 -08:00
aops.c ocfs2: fix a deadlock issue in ocfs2_dio_end_io_write() 2016-03-25 16:37:42 -07:00
aops.h ocfs2: fix ip_unaligned_aio deadlock with dio work queue 2016-03-25 16:37:42 -07:00
blockcheck.c
blockcheck.h
buffer_head_io.c
buffer_head_io.h
dcache.c
dcache.h
dir.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
dir.h
dlmglue.c ocfs2: NFS hangs in __ocfs2_cluster_lock due to race with ocfs2_unblock_lock 2016-01-21 17:20:51 -08:00
dlmglue.h
export.c
export.h
extent_map.c
extent_map.h
file.c ocfs2: fix ip_unaligned_aio deadlock with dio work queue 2016-03-25 16:37:42 -07:00
file.h
filecheck.c ocfs2: sysfile interfaces for online file check 2016-03-22 15:36:02 -07:00
filecheck.h ocfs2: sysfile interfaces for online file check 2016-03-22 15:36:02 -07:00
heartbeat.c
heartbeat.h
inode.c ocfs2: record UNWRITTEN extents when populate write desc 2016-03-25 16:37:42 -07:00
inode.h ocfs2: fix ip_unaligned_aio deadlock with dio work queue 2016-03-25 16:37:42 -07:00
ioctl.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
ioctl.h
journal.c ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local 2016-03-25 16:37:42 -07:00
journal.h
Kconfig
localalloc.c ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local 2016-03-25 16:37:42 -07:00
localalloc.h
locks.c
locks.h
Makefile ocfs2: sysfile interfaces for online file check 2016-03-22 15:36:02 -07:00
mmap.c ocfs2: add ocfs2_write_type_t type to identify the caller of write 2016-03-25 16:37:42 -07:00
mmap.h
move_extents.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
move_extents.h
namei.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
namei.h
ocfs1_fs_compat.h
ocfs2.h ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local 2016-03-25 16:37:42 -07:00
ocfs2_fs.h
ocfs2_ioctl.h
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h ocfs2: code clean up for direct io 2016-03-25 16:37:42 -07:00
quota.h
quota_global.c ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local 2016-03-25 16:37:42 -07:00
quota_local.c
refcounttree.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
refcounttree.h
reservations.c
reservations.h
resize.c ocfs2: solve a problem of crossing the boundary in updating backups 2016-03-25 16:37:42 -07:00
resize.h
slot_map.c ocfs2: fix slot overwritten if storage link down during mount 2016-01-14 16:00:49 -08:00
slot_map.h
stack_o2cb.c
stack_user.c
stackglue.c ocfs2: export ocfs2_kset for online file check 2016-03-22 15:36:02 -07:00
stackglue.h ocfs2: export ocfs2_kset for online file check 2016-03-22 15:36:02 -07:00
suballoc.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
suballoc.h
super.c ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local 2016-03-25 16:37:42 -07:00
super.h ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local 2016-03-25 16:37:42 -07:00
symlink.c
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
xattr.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
xattr.h