linux-stable-rt/fs/dlm
David Teigland c36258b592 [DLM] block dlm_recv in recovery transition
Introduce a per-lockspace rwsem that's held in read mode by dlm_recv
threads while working in the dlm.  This allows dlm_recv activity to be
suspended when the lockspace transitions to, from and between recovery
cycles.

The specific bug prompting this change is one where an in-progress
recovery cycle is aborted by a new recovery cycle.  While dlm_recv was
processing a recovery message, the recovery cycle was aborted and
dlm_recoverd began cleaning up.  dlm_recv decremented recover_locks_count
on an rsb after dlm_recoverd had reset it to zero.  This is fixed by
suspending dlm_recv (taking write lock on the rwsem) before aborting the
current recovery.

The transitions to/from normal and recovery modes are simplified by using
this new ability to block dlm_recv.  The switch from normal to recovery
mode means dlm_recv goes from processing locking messages, to saving them
for later, and vice versa.  Races are avoided by blocking dlm_recv when
setting the flag that switches between modes.

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2007-10-10 08:56:38 +01:00
..
Kconfig
Makefile [DLM] add lock timeouts and warnings [2/6] 2007-07-09 08:22:33 +01:00
ast.c
ast.h
config.c configfs: Convert subsystem semaphore to mutex 2007-07-10 17:10:56 -07:00
config.h [DLM] add lock timeouts and warnings [2/6] 2007-07-09 08:22:33 +01:00
debug_fs.c [DLM] dump more lock values 2007-07-09 08:24:13 +01:00
dir.c
dir.h
dlm_internal.h [DLM] block dlm_recv in recovery transition 2007-10-10 08:56:38 +01:00
lock.c [DLM] block dlm_recv in recovery transition 2007-10-10 08:56:38 +01:00
lock.h [DLM] block dlm_recv in recovery transition 2007-10-10 08:56:38 +01:00
lockspace.c [DLM] block dlm_recv in recovery transition 2007-10-10 08:56:38 +01:00
lockspace.h
lowcomms.c [DLM] Make dlm_sendd cond_resched more 2007-10-10 08:56:19 +01:00
lowcomms.h
lvb_table.h
main.c [DLM] add lock timeouts and warnings [2/6] 2007-07-09 08:22:33 +01:00
member.c [DLM] block dlm_recv in recovery transition 2007-10-10 08:56:38 +01:00
member.h
memory.c mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00
memory.h
midcomms.c [DLM] block dlm_recv in recovery transition 2007-10-10 08:56:38 +01:00
midcomms.h
netlink.c [DLM] timeout fixes 2007-07-09 08:22:52 +01:00
rcom.c [DLM] block dlm_recv in recovery transition 2007-10-10 08:56:38 +01:00
rcom.h [DLM] block dlm_recv in recovery transition 2007-10-10 08:56:38 +01:00
recover.c
recover.h
recoverd.c [DLM] block dlm_recv in recovery transition 2007-10-10 08:56:38 +01:00
recoverd.h
requestqueue.c [DLM] block dlm_recv in recovery transition 2007-10-10 08:56:38 +01:00
requestqueue.h [DLM] block dlm_recv in recovery transition 2007-10-10 08:56:38 +01:00
user.c [DLM] canceling deadlocked lock 2007-07-09 08:22:54 +01:00
user.h
util.c
util.h