diff options
author | David Teigland <teigland@redhat.com> | 2014-10-17 11:05:50 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2014-11-19 14:48:02 -0600 |
commit | 2ab4bd8ea3a6954bc79a9bbeb291cd6c2d6213a7 (patch) | |
tree | c15e4590760ba76c29f2fca34c1b1edf82186cbd /fs/dlm/lock.h | |
parent | 206c5f60a3d902bc4b56dab2de3e88de5eb06108 (diff) | |
download | linux-stable-2ab4bd8ea3a6954bc79a9bbeb291cd6c2d6213a7.tar.gz linux-stable-2ab4bd8ea3a6954bc79a9bbeb291cd6c2d6213a7.tar.bz2 linux-stable-2ab4bd8ea3a6954bc79a9bbeb291cd6c2d6213a7.zip |
dlm: adopt orphan locks
A process may exit, leaving an orphan lock in the lockspace.
This adds the capability for another process to acquire the
orphan lock. Acquiring the orphan just moves the lock from
the orphan list onto the acquiring process's list of locks.
An adopting process must specify the resource name and mode
of the lock it wants to adopt. If a matching lock is found,
the lock is moved to the caller's 's list of locks, and the
lkid of the lock is returned like the lkid of a new lock.
If an orphan with a different mode is found, then -EAGAIN is
returned. If no orphan lock is found on the resource, then
-ENOENT is returned. No async completion is used because
the result is immediately available.
Also, when orphans are purged, allow a zero nodeid to refer
to the local nodeid so the caller does not need to look up
the local nodeid.
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/lock.h')
-rw-r--r-- | fs/dlm/lock.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/dlm/lock.h b/fs/dlm/lock.h index 5e0c72e36a9b..ed8ebd3a8593 100644 --- a/fs/dlm/lock.h +++ b/fs/dlm/lock.h @@ -49,6 +49,9 @@ int dlm_user_request(struct dlm_ls *ls, struct dlm_user_args *ua, int mode, int dlm_user_convert(struct dlm_ls *ls, struct dlm_user_args *ua_tmp, int mode, uint32_t flags, uint32_t lkid, char *lvb_in, unsigned long timeout_cs); +int dlm_user_adopt_orphan(struct dlm_ls *ls, struct dlm_user_args *ua_tmp, + int mode, uint32_t flags, void *name, unsigned int namelen, + unsigned long timeout_cs, uint32_t *lkid); int dlm_user_unlock(struct dlm_ls *ls, struct dlm_user_args *ua_tmp, uint32_t flags, uint32_t lkid, char *lvb_in); int dlm_user_cancel(struct dlm_ls *ls, struct dlm_user_args *ua_tmp, |