linux/fs/dlm
David Teigland ef0c2bb05f [DLM] overlapping cancel and unlock
Full cancel and force-unlock support.  In the past, cancel and force-unlock
wouldn't work if there was another operation in progress on the lock.  Now,
both cancel and unlock-force can overlap an operation on a lock, meaning there
may be 2 or 3 operations in progress on a lock in parallel.  This support is
important not only because cancel and force-unlock are explicit operations
that an app can use, but both are used implicitly when a process exits while
holding locks.

Summary of changes:

- add-to and remove-from waiters functions were rewritten to handle situations
  with more than one remote operation outstanding on a lock

- validate_unlock_args detects when an overlapping cancel/unlock-force
  can be sent and when it needs to be delayed until a request/lookup
  reply is received

- processing request/lookup replies detects when cancel/unlock-force
  occured during the op, and carries out the delayed cancel/unlock-force

- manipulation of the "waiters" (remote operation) state of a lock moved under
  the standard rsb mutex that protects all the other lock state

- the two recovery routines related to locks on the waiters list changed
  according to the way lkb's are now locked before accessing waiters state

- waiters recovery detects when lkb's being recovered have overlapping
  cancel/unlock-force, and may not recover such locks

- revert_lock (cancel) returns a value to distinguish cases where it did
  nothing vs cases where it actually did a cancel; the cancel completion ast
  should only be done when cancel did something

- orphaned locks put on new list so they can be found later for purging

- cancel must be called on a lock when making it an orphan

- flag user locks (ENDOFLIFE) at the end of their useful life (to the
  application) so we can return an error for any further cancel/unlock-force

- we weren't setting COMP/BAST ast flags if one was already set, so we'd lose
  either a completion or blocking ast

- clear an unread bast on a lock that's become unlocked

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2007-05-01 09:11:00 +01:00
..
ast.c [DLM] down conversion clearing flags 2006-08-23 16:07:31 -04:00
ast.h [DLM] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00
config.c [DLM] expose dlm_config_info fields in configfs 2007-02-05 13:36:43 -05:00
config.h [DLM] add config entry to enable log_debug 2007-02-05 13:36:40 -05:00
debug_fs.c [PATCH] mark struct file_operations const 6 2007-02-12 09:48:45 -08:00
dir.c [DLM] Update DLM to the latest patch level 2006-01-20 08:47:07 +00:00
dir.h [DLM] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00
dlm_internal.h [DLM] overlapping cancel and unlock 2007-05-01 09:11:00 +01:00
Kconfig [DLM/GFS2] indent help text 2007-02-05 13:38:20 -05:00
lock.c [DLM] overlapping cancel and unlock 2007-05-01 09:11:00 +01:00
lock.h [DLM] dump rsb and locks on assert 2006-08-21 09:50:09 -04:00
lockspace.c [DLM] overlapping cancel and unlock 2007-05-01 09:11:00 +01:00
lockspace.h [DLM] dlm: user locks 2006-07-13 09:25:34 -04:00
lowcomms-sctp.c [DLM] Use workqueues for dlm lowcomms 2007-02-05 13:36:52 -05:00
lowcomms-tcp.c [DLM] fix coverity-spotted stupidity 2007-05-01 09:10:57 +01:00
lowcomms.h [DLM] Clean up lowcomms 2006-12-07 09:25:13 -05:00
lvb_table.h [DLM] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00
main.c [DLM] Clean up lowcomms 2006-12-07 09:25:13 -05:00
Makefile [DLM] Add support for tcp communications 2006-11-30 10:35:00 -05:00
member.c [DLM] fix aborted recovery during node removal 2006-11-30 10:35:13 -05:00
member.h [DLM] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00
memory.c [PATCH] Transform kmem_cache_alloc()+memset(0) -> kmem_cache_zalloc(). 2007-02-11 10:51:27 -08:00
memory.h [DLM] Remove range locks from the DLM 2006-02-23 09:56:38 +00:00
midcomms.c [DLM] rename dlm_config_info fields 2007-02-05 13:36:37 -05:00
midcomms.h [DLM] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00
rcom.c [DLM] rename dlm_config_info fields 2007-02-05 13:36:37 -05:00
rcom.h [DLM] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00
recover.c [DLM] fix master recovery 2007-02-05 13:36:58 -05:00
recover.h [DLM] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00
recoverd.c [DLM] change some log_error to log_debug 2007-02-05 13:36:34 -05:00
recoverd.h [DLM] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00
requestqueue.c [DLM] fix add_requestqueue checking nodes list 2006-11-30 10:37:00 -05:00
requestqueue.h [DLM] fix requestqueue race 2006-11-30 10:35:10 -05:00
user.c [DLM] overlapping cancel and unlock 2007-05-01 09:11:00 +01:00
user.h [DLM] dlm: user locks 2006-07-13 09:25:34 -04:00
util.c [DLM] fix old rcom messages 2007-02-05 13:35:50 -05:00
util.h [DLM] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00