aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dlm.h
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2007-05-18 09:59:31 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2007-07-09 03:22:33 -0400
commit3ae1acf93a21512512f8a78430fcde5992dd208e (patch)
tree878ed3c619530c6acf862ecf663063f66fc47a06 /include/linux/dlm.h
parent85e86edf951a8a39954c0ba1edbe4a58827dcd5c (diff)
[DLM] add lock timeouts and warnings [2/6]
New features: lock timeouts and time warnings. If the DLM_LKF_TIMEOUT flag is set, then the request/conversion will be canceled after waiting the specified number of centiseconds (specified per lock). This feature is only available for locks requested through libdlm (can be enabled for kernel dlm users if there's a use for it.) If the new DLM_LSFL_TIMEWARN flag is set when creating the lockspace, then a warning message will be sent to userspace (using genetlink) after a request/conversion has been waiting for a given number of centiseconds (configurable per node). The time warnings will be used in the future to do deadlock detection in userspace. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'include/linux/dlm.h')
-rw-r--r--include/linux/dlm.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/dlm.h b/include/linux/dlm.h
index 1b1dcb9a40bb..975f17d8aa53 100644
--- a/include/linux/dlm.h
+++ b/include/linux/dlm.h
@@ -2,7 +2,7 @@
2******************************************************************************* 2*******************************************************************************
3** 3**
4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
5** Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. 5** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
6** 6**
7** This copyrighted material is made available to anyone wishing to use, 7** This copyrighted material is made available to anyone wishing to use,
8** modify, copy, or redistribute it subject to the terms and conditions 8** modify, copy, or redistribute it subject to the terms and conditions
@@ -149,6 +149,7 @@
149#define DLM_LKF_ALTPR 0x00008000 149#define DLM_LKF_ALTPR 0x00008000
150#define DLM_LKF_ALTCW 0x00010000 150#define DLM_LKF_ALTCW 0x00010000
151#define DLM_LKF_FORCEUNLOCK 0x00020000 151#define DLM_LKF_FORCEUNLOCK 0x00020000
152#define DLM_LKF_TIMEOUT 0x00040000
152 153
153/* 154/*
154 * Some return codes that are not in errno.h 155 * Some return codes that are not in errno.h
@@ -199,11 +200,11 @@ struct dlm_lksb {
199 char * sb_lvbptr; 200 char * sb_lvbptr;
200}; 201};
201 202
203#define DLM_LSFL_NODIR 0x00000001
204#define DLM_LSFL_TIMEWARN 0x00000002
202 205
203#ifdef __KERNEL__ 206#ifdef __KERNEL__
204 207
205#define DLM_LSFL_NODIR 0x00000001
206
207/* 208/*
208 * dlm_new_lockspace 209 * dlm_new_lockspace
209 * 210 *