dlm_internal.h (d6e24788d21c4f1a8f00c811c31dd4e9a58679ac) dlm_internal.h (4875647a08e35f77274838d97ca8fa44158d50e2)
1/******************************************************************************
2*******************************************************************************
3**
4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
5** Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
6**
7** This copyrighted material is made available to anyone wishing to use,
8** modify, copy, or redistribute it subject to the terms and conditions

--- 257 unchanged lines hidden (view full) ---

266 struct work_struct lkb_cb_work;
267 struct list_head lkb_cb_list; /* for ls_cb_delay or proc->asts */
268 struct dlm_callback lkb_callbacks[DLM_CALLBACKS_SIZE];
269 struct dlm_callback lkb_last_cast;
270 struct dlm_callback lkb_last_bast;
271 ktime_t lkb_last_cast_time; /* for debugging */
272 ktime_t lkb_last_bast_time; /* for debugging */
273
1/******************************************************************************
2*******************************************************************************
3**
4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
5** Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
6**
7** This copyrighted material is made available to anyone wishing to use,
8** modify, copy, or redistribute it subject to the terms and conditions

--- 257 unchanged lines hidden (view full) ---

266 struct work_struct lkb_cb_work;
267 struct list_head lkb_cb_list; /* for ls_cb_delay or proc->asts */
268 struct dlm_callback lkb_callbacks[DLM_CALLBACKS_SIZE];
269 struct dlm_callback lkb_last_cast;
270 struct dlm_callback lkb_last_bast;
271 ktime_t lkb_last_cast_time; /* for debugging */
272 ktime_t lkb_last_bast_time; /* for debugging */
273
274 uint64_t lkb_recover_seq; /* from ls_recover_seq */
275
274 char *lkb_lvbptr;
275 struct dlm_lksb *lkb_lksb; /* caller's status block */
276 void (*lkb_astfn) (void *astparam);
277 void (*lkb_bastfn) (void *astparam, int mode);
278 union {
279 void *lkb_astparam; /* caller's ast arg */
280 struct dlm_user_args *lkb_ua;
281 };

--- 38 unchanged lines hidden (view full) ---

320
321enum rsb_flags {
322 RSB_MASTER_UNCERTAIN,
323 RSB_VALNOTVALID,
324 RSB_VALNOTVALID_PREV,
325 RSB_NEW_MASTER,
326 RSB_NEW_MASTER2,
327 RSB_RECOVER_CONVERT,
276 char *lkb_lvbptr;
277 struct dlm_lksb *lkb_lksb; /* caller's status block */
278 void (*lkb_astfn) (void *astparam);
279 void (*lkb_bastfn) (void *astparam, int mode);
280 union {
281 void *lkb_astparam; /* caller's ast arg */
282 struct dlm_user_args *lkb_ua;
283 };

--- 38 unchanged lines hidden (view full) ---

322
323enum rsb_flags {
324 RSB_MASTER_UNCERTAIN,
325 RSB_VALNOTVALID,
326 RSB_VALNOTVALID_PREV,
327 RSB_NEW_MASTER,
328 RSB_NEW_MASTER2,
329 RSB_RECOVER_CONVERT,
328 RSB_LOCKS_PURGED,
330 RSB_RECOVER_GRANT,
329};
330
331static inline void rsb_set_flag(struct dlm_rsb *r, enum rsb_flags flag)
332{
333 __set_bit(flag, &r->res_flags);
334}
335
336static inline void rsb_clear_flag(struct dlm_rsb *r, enum rsb_flags flag)

--- 229 unchanged lines hidden (view full) ---

566 uint64_t ls_recover_seq;
567 struct dlm_recover *ls_recover_args;
568 struct rw_semaphore ls_in_recovery; /* block local requests */
569 struct rw_semaphore ls_recv_active; /* block dlm_recv */
570 struct list_head ls_requestqueue;/* queue remote requests */
571 struct mutex ls_requestqueue_mutex;
572 struct dlm_rcom *ls_recover_buf;
573 int ls_recover_nodeid; /* for debugging */
331};
332
333static inline void rsb_set_flag(struct dlm_rsb *r, enum rsb_flags flag)
334{
335 __set_bit(flag, &r->res_flags);
336}
337
338static inline void rsb_clear_flag(struct dlm_rsb *r, enum rsb_flags flag)

--- 229 unchanged lines hidden (view full) ---

568 uint64_t ls_recover_seq;
569 struct dlm_recover *ls_recover_args;
570 struct rw_semaphore ls_in_recovery; /* block local requests */
571 struct rw_semaphore ls_recv_active; /* block dlm_recv */
572 struct list_head ls_requestqueue;/* queue remote requests */
573 struct mutex ls_requestqueue_mutex;
574 struct dlm_rcom *ls_recover_buf;
575 int ls_recover_nodeid; /* for debugging */
576 unsigned int ls_recover_locks_in; /* for log info */
574 uint64_t ls_rcom_seq;
575 spinlock_t ls_rcom_spin;
576 struct list_head ls_recover_list;
577 spinlock_t ls_recover_list_lock;
578 int ls_recover_list_count;
579 wait_queue_head_t ls_wait_general;
580 struct mutex ls_clear_proc_locks;
581

--- 10 unchanged lines hidden (view full) ---

592#define LSFL_WORK 0
593#define LSFL_RUNNING 1
594#define LSFL_RECOVERY_STOP 2
595#define LSFL_RCOM_READY 3
596#define LSFL_RCOM_WAIT 4
597#define LSFL_UEVENT_WAIT 5
598#define LSFL_TIMEWARN 6
599#define LSFL_CB_DELAY 7
577 uint64_t ls_rcom_seq;
578 spinlock_t ls_rcom_spin;
579 struct list_head ls_recover_list;
580 spinlock_t ls_recover_list_lock;
581 int ls_recover_list_count;
582 wait_queue_head_t ls_wait_general;
583 struct mutex ls_clear_proc_locks;
584

--- 10 unchanged lines hidden (view full) ---

595#define LSFL_WORK 0
596#define LSFL_RUNNING 1
597#define LSFL_RECOVERY_STOP 2
598#define LSFL_RCOM_READY 3
599#define LSFL_RCOM_WAIT 4
600#define LSFL_UEVENT_WAIT 5
601#define LSFL_TIMEWARN 6
602#define LSFL_CB_DELAY 7
603#define LSFL_NODIR 8
600
601/* much of this is just saving user space pointers associated with the
602 lock that we pass back to the user lib with an ast */
603
604struct dlm_user_args {
605 struct dlm_user_proc *proc; /* each process that opens the lockspace
606 device has private data
607 (dlm_user_proc) on the struct file,

--- 31 unchanged lines hidden (view full) ---

639
640static inline int dlm_recovery_stopped(struct dlm_ls *ls)
641{
642 return test_bit(LSFL_RECOVERY_STOP, &ls->ls_flags);
643}
644
645static inline int dlm_no_directory(struct dlm_ls *ls)
646{
604
605/* much of this is just saving user space pointers associated with the
606 lock that we pass back to the user lib with an ast */
607
608struct dlm_user_args {
609 struct dlm_user_proc *proc; /* each process that opens the lockspace
610 device has private data
611 (dlm_user_proc) on the struct file,

--- 31 unchanged lines hidden (view full) ---

643
644static inline int dlm_recovery_stopped(struct dlm_ls *ls)
645{
646 return test_bit(LSFL_RECOVERY_STOP, &ls->ls_flags);
647}
648
649static inline int dlm_no_directory(struct dlm_ls *ls)
650{
647 return (ls->ls_exflags & DLM_LSFL_NODIR) ? 1 : 0;
651 return test_bit(LSFL_NODIR, &ls->ls_flags);
648}
649
650int dlm_netlink_init(void);
651void dlm_netlink_exit(void);
652void dlm_timeout_warn(struct dlm_lkb *lkb);
653int dlm_plock_init(void);
654void dlm_plock_exit(void);
655

--- 14 unchanged lines hidden ---
652}
653
654int dlm_netlink_init(void);
655void dlm_netlink_exit(void);
656void dlm_timeout_warn(struct dlm_lkb *lkb);
657int dlm_plock_init(void);
658void dlm_plock_exit(void);
659

--- 14 unchanged lines hidden ---