summaryrefslogtreecommitdiff
path: root/include/uapi/linux/dlm_plock.h
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2023-07-20 15:22:40 +0300
committerDavid Teigland <teigland@redhat.com>2023-07-21 01:24:57 +0300
commit568f915655b3b4c40032104e4d0014e5e2c474b9 (patch)
tree6888d69f78c3717317f3242ddd6ba60753746941 /include/uapi/linux/dlm_plock.h
parent99c58d6480d937dbdc2b4acfdea1bcf7ab113e5e (diff)
downloadlinux-568f915655b3b4c40032104e4d0014e5e2c474b9.tar.xz
fs: dlm: allow to F_SETLKW getting interrupted
This patch implements dlm plock F_SETLKW interruption feature. If a blocking posix lock request got interrupted in user space by a signal a cancellation request for a non granted lock request to the user space lock manager will be send. The user lock manager answers either with zero or a negative errno code. A errno of -ENOENT signals that there is currently no blocking lock request waiting to being granted. In case of -ENOENT it was probably to late to request a cancellation and the pending lock got granted. In any error case we will wait until the lock is being granted as cancellation failed, this causes also that in case of an older user lock manager returning -EINVAL we will wait as cancellation is not supported which should be fine. If a user requires this feature the user should update dlm user space to support lock request cancellation. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'include/uapi/linux/dlm_plock.h')
-rw-r--r--include/uapi/linux/dlm_plock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/dlm_plock.h b/include/uapi/linux/dlm_plock.h
index 63b6c1fd9169..eb66afcac40e 100644
--- a/include/uapi/linux/dlm_plock.h
+++ b/include/uapi/linux/dlm_plock.h
@@ -22,6 +22,7 @@ enum {
DLM_PLOCK_OP_LOCK = 1,
DLM_PLOCK_OP_UNLOCK,
DLM_PLOCK_OP_GET,
+ DLM_PLOCK_OP_CANCEL,
};
#define DLM_PLOCK_FL_CLOSE 1