dlm_internal.h (92e95733307e7b6dd352c12fa174089ed51e7208) | dlm_internal.h (61bed0baa4dba17dd06cdfe20481a580718d6c7c) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-only */ 2/****************************************************************************** 3******************************************************************************* 4** 5** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 6** Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved. 7** 8** --- 197 unchanged lines hidden (view full) --- 206#define DLM_IFL_OVERLAP_CANCEL 0x00100000 207#define DLM_IFL_ENDOFLIFE 0x00200000 208#ifdef CONFIG_DLM_DEPRECATED_API 209#define DLM_IFL_WATCH_TIMEWARN 0x00400000 210#define DLM_IFL_TIMEOUT_CANCEL 0x00800000 211#endif 212#define DLM_IFL_DEADLOCK_CANCEL 0x01000000 213#define DLM_IFL_STUB_MS 0x02000000 /* magic number for m_flags */ | 1/* SPDX-License-Identifier: GPL-2.0-only */ 2/****************************************************************************** 3******************************************************************************* 4** 5** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 6** Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved. 7** 8** --- 197 unchanged lines hidden (view full) --- 206#define DLM_IFL_OVERLAP_CANCEL 0x00100000 207#define DLM_IFL_ENDOFLIFE 0x00200000 208#ifdef CONFIG_DLM_DEPRECATED_API 209#define DLM_IFL_WATCH_TIMEWARN 0x00400000 210#define DLM_IFL_TIMEOUT_CANCEL 0x00800000 211#endif 212#define DLM_IFL_DEADLOCK_CANCEL 0x01000000 213#define DLM_IFL_STUB_MS 0x02000000 /* magic number for m_flags */ |
214#define DLM_IFL_NEED_SCHED 0x04000000 |
|
214/* least significant 2 bytes are message changed, they are full transmitted 215 * but at receive side only the 2 bytes LSB will be set. 216 * 217 * Even wireshark dlm dissector does only evaluate the lower bytes and note 218 * that they may not be used on transceiver side, we assume the higher bytes 219 * are for internal use or reserved so long they are not parsed on receiver 220 * side. 221 */ 222#define DLM_IFL_USER 0x00000001 223#define DLM_IFL_ORPHAN 0x00000002 224 | 215/* least significant 2 bytes are message changed, they are full transmitted 216 * but at receive side only the 2 bytes LSB will be set. 217 * 218 * Even wireshark dlm dissector does only evaluate the lower bytes and note 219 * that they may not be used on transceiver side, we assume the higher bytes 220 * are for internal use or reserved so long they are not parsed on receiver 221 * side. 222 */ 223#define DLM_IFL_USER 0x00000001 224#define DLM_IFL_ORPHAN 0x00000002 225 |
225#define DLM_CALLBACKS_SIZE 6 226 | |
227#define DLM_CB_CAST 0x00000001 228#define DLM_CB_BAST 0x00000002 | 226#define DLM_CB_CAST 0x00000001 227#define DLM_CB_BAST 0x00000002 |
229#define DLM_CB_SKIP 0x00000004 | |
230 231struct dlm_callback { | 228 229struct dlm_callback { |
232 uint64_t seq; | |
233 uint32_t flags; /* DLM_CBF_ */ 234 int sb_status; /* copy to lksb status */ 235 uint8_t sb_flags; /* copy to lksb flags */ 236 int8_t mode; /* rq mode of bast, gr mode of cast */ | 230 uint32_t flags; /* DLM_CBF_ */ 231 int sb_status; /* copy to lksb status */ 232 uint8_t sb_flags; /* copy to lksb flags */ 233 int8_t mode; /* rq mode of bast, gr mode of cast */ |
234 235 struct list_head list; 236 struct kref ref; |
|
237}; 238 239struct dlm_lkb { 240 struct dlm_rsb *lkb_resource; /* the rsb */ 241 struct kref lkb_ref; 242 int lkb_nodeid; /* copied from rsb */ 243 int lkb_ownpid; /* pid of lock owner */ 244 uint32_t lkb_id; /* our lock ID */ --- 21 unchanged lines hidden (view full) --- 266#ifdef CONFIG_DLM_DEPRECATED_API 267 struct list_head lkb_time_list; 268 unsigned long lkb_timeout_cs; 269#endif 270 271 spinlock_t lkb_cb_lock; 272 struct work_struct lkb_cb_work; 273 struct list_head lkb_cb_list; /* for ls_cb_delay or proc->asts */ | 237}; 238 239struct dlm_lkb { 240 struct dlm_rsb *lkb_resource; /* the rsb */ 241 struct kref lkb_ref; 242 int lkb_nodeid; /* copied from rsb */ 243 int lkb_ownpid; /* pid of lock owner */ 244 uint32_t lkb_id; /* our lock ID */ --- 21 unchanged lines hidden (view full) --- 266#ifdef CONFIG_DLM_DEPRECATED_API 267 struct list_head lkb_time_list; 268 unsigned long lkb_timeout_cs; 269#endif 270 271 spinlock_t lkb_cb_lock; 272 struct work_struct lkb_cb_work; 273 struct list_head lkb_cb_list; /* for ls_cb_delay or proc->asts */ |
274 struct dlm_callback lkb_callbacks[DLM_CALLBACKS_SIZE]; 275 struct dlm_callback lkb_last_cast; 276 struct dlm_callback lkb_last_bast; | 274 struct list_head lkb_callbacks; 275 struct dlm_callback *lkb_last_cast; 276 struct dlm_callback *lkb_last_cb; 277 int lkb_last_bast_mode; |
277 ktime_t lkb_last_cast_time; /* for debugging */ 278 ktime_t lkb_last_bast_time; /* for debugging */ 279 280 uint64_t lkb_recover_seq; /* from ls_recover_seq */ 281 282 char *lkb_lvbptr; 283 struct dlm_lksb *lkb_lksb; /* caller's status block */ 284 void (*lkb_astfn) (void *astparam); --- 507 unchanged lines hidden --- | 278 ktime_t lkb_last_cast_time; /* for debugging */ 279 ktime_t lkb_last_bast_time; /* for debugging */ 280 281 uint64_t lkb_recover_seq; /* from ls_recover_seq */ 282 283 char *lkb_lvbptr; 284 struct dlm_lksb *lkb_lksb; /* caller's status block */ 285 void (*lkb_astfn) (void *astparam); --- 507 unchanged lines hidden --- |