summaryrefslogtreecommitdiffstats
path: root/include/linux/dlm_plock.h
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2011-03-02 14:20:04 -0600
committerDavid Teigland <teigland@redhat.com>2011-05-23 10:47:06 -0500
commit901025d2f3194b4868980c8ba80df4cc0aa1282c (patch)
tree66df1472a10def86391b124ea69d6f182aef98db /include/linux/dlm_plock.h
parent2a7ce0edd661b3144c7b916ecf1eba0967b6d4a5 (diff)
downloadop-kernel-dev-901025d2f3194b4868980c8ba80df4cc0aa1282c.zip
op-kernel-dev-901025d2f3194b4868980c8ba80df4cc0aa1282c.tar.gz
dlm: make plock operation killable
Allow processes blocked on plock requests to be interrupted when they are killed. This leaves the problem of cleaning up the lock state in userspace. This has three parts: 1. Add a flag to unlock operations sent to userspace indicating the file is being closed. Userspace will then look for and clear any waiting plock operations that were abandoned by an interrupted process. 2. Queue an unlock-close operation (like in 1) to clean up userspace from an interrupted plock request. This is needed because the vfs will not send a cleanup-unlock if it sees no locks on the file, which it won't if the interrupted operation was the only one. 3. Do not use replies from userspace for unlock-close operations because they are unnecessary (they are just cleaning up for the process which did not make an unlock call). This also simplifies the new unlock-close generated from point 2. Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'include/linux/dlm_plock.h')
-rw-r--r--include/linux/dlm_plock.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/dlm_plock.h b/include/linux/dlm_plock.h
index 2dd2124..3b1cc1b 100644
--- a/include/linux/dlm_plock.h
+++ b/include/linux/dlm_plock.h
@@ -14,7 +14,7 @@
#define DLM_PLOCK_MISC_NAME "dlm_plock"
#define DLM_PLOCK_VERSION_MAJOR 1
-#define DLM_PLOCK_VERSION_MINOR 1
+#define DLM_PLOCK_VERSION_MINOR 2
#define DLM_PLOCK_VERSION_PATCH 0
enum {
@@ -23,12 +23,14 @@ enum {
DLM_PLOCK_OP_GET,
};
+#define DLM_PLOCK_FL_CLOSE 1
+
struct dlm_plock_info {
__u32 version[3];
__u8 optype;
__u8 ex;
__u8 wait;
- __u8 pad;
+ __u8 flags;
__u32 pid;
__s32 nodeid;
__s32 rv;
OpenPOWER on IntegriCloud