aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/dlm_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r--fs/dlm/dlm_internal.h60
1 files changed, 50 insertions, 10 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index fe2860c02449..3a564d197e99 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.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-2010 Red Hat, Inc. All rights reserved. 5** Copyright (C) 2004-2011 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
@@ -103,8 +103,8 @@ struct dlm_dirtable {
103}; 103};
104 104
105struct dlm_rsbtable { 105struct dlm_rsbtable {
106 struct list_head list; 106 struct rb_root keep;
107 struct list_head toss; 107 struct rb_root toss;
108 spinlock_t lock; 108 spinlock_t lock;
109}; 109};
110 110
@@ -117,6 +117,10 @@ struct dlm_member {
117 struct list_head list; 117 struct list_head list;
118 int nodeid; 118 int nodeid;
119 int weight; 119 int weight;
120 int slot;
121 int slot_prev;
122 int comm_seq;
123 uint32_t generation;
120}; 124};
121 125
122/* 126/*
@@ -125,10 +129,8 @@ struct dlm_member {
125 129
126struct dlm_recover { 130struct dlm_recover {
127 struct list_head list; 131 struct list_head list;
128 int *nodeids; /* nodeids of all members */ 132 struct dlm_config_node *nodes;
129 int node_count; 133 int nodes_count;
130 int *new; /* nodeids of new members */
131 int new_count;
132 uint64_t seq; 134 uint64_t seq;
133}; 135};
134 136
@@ -285,7 +287,10 @@ struct dlm_rsb {
285 unsigned long res_toss_time; 287 unsigned long res_toss_time;
286 uint32_t res_first_lkid; 288 uint32_t res_first_lkid;
287 struct list_head res_lookup; /* lkbs waiting on first */ 289 struct list_head res_lookup; /* lkbs waiting on first */
288 struct list_head res_hashchain; /* rsbtbl */ 290 union {
291 struct list_head res_hashchain;
292 struct rb_node res_hashnode; /* rsbtbl */
293 };
289 struct list_head res_grantqueue; 294 struct list_head res_grantqueue;
290 struct list_head res_convertqueue; 295 struct list_head res_convertqueue;
291 struct list_head res_waitqueue; 296 struct list_head res_waitqueue;
@@ -334,7 +339,9 @@ static inline int rsb_flag(struct dlm_rsb *r, enum rsb_flags flag)
334/* dlm_header is first element of all structs sent between nodes */ 339/* dlm_header is first element of all structs sent between nodes */
335 340
336#define DLM_HEADER_MAJOR 0x00030000 341#define DLM_HEADER_MAJOR 0x00030000
337#define DLM_HEADER_MINOR 0x00000000 342#define DLM_HEADER_MINOR 0x00000001
343
344#define DLM_HEADER_SLOTS 0x00000001
338 345
339#define DLM_MSG 1 346#define DLM_MSG 1
340#define DLM_RCOM 2 347#define DLM_RCOM 2
@@ -422,10 +429,34 @@ union dlm_packet {
422 struct dlm_rcom rcom; 429 struct dlm_rcom rcom;
423}; 430};
424 431
432#define DLM_RSF_NEED_SLOTS 0x00000001
433
434/* RCOM_STATUS data */
435struct rcom_status {
436 __le32 rs_flags;
437 __le32 rs_unused1;
438 __le64 rs_unused2;
439};
440
441/* RCOM_STATUS_REPLY data */
425struct rcom_config { 442struct rcom_config {
426 __le32 rf_lvblen; 443 __le32 rf_lvblen;
427 __le32 rf_lsflags; 444 __le32 rf_lsflags;
428 __le64 rf_unused; 445
446 /* DLM_HEADER_SLOTS adds: */
447 __le32 rf_flags;
448 __le16 rf_our_slot;
449 __le16 rf_num_slots;
450 __le32 rf_generation;
451 __le32 rf_unused1;
452 __le64 rf_unused2;
453};
454
455struct rcom_slot {
456 __le32 ro_nodeid;
457 __le16 ro_slot;
458 __le16 ro_unused1;
459 __le64 ro_unused2;
429}; 460};
430 461
431struct rcom_lock { 462struct rcom_lock {
@@ -452,6 +483,7 @@ struct dlm_ls {
452 struct list_head ls_list; /* list of lockspaces */ 483 struct list_head ls_list; /* list of lockspaces */
453 dlm_lockspace_t *ls_local_handle; 484 dlm_lockspace_t *ls_local_handle;
454 uint32_t ls_global_id; /* global unique lockspace ID */ 485 uint32_t ls_global_id; /* global unique lockspace ID */
486 uint32_t ls_generation;
455 uint32_t ls_exflags; 487 uint32_t ls_exflags;
456 int ls_lvblen; 488 int ls_lvblen;
457 int ls_count; /* refcount of processes in 489 int ls_count; /* refcount of processes in
@@ -490,6 +522,11 @@ struct dlm_ls {
490 int ls_total_weight; 522 int ls_total_weight;
491 int *ls_node_array; 523 int *ls_node_array;
492 524
525 int ls_slot;
526 int ls_num_slots;
527 int ls_slots_size;
528 struct dlm_slot *ls_slots;
529
493 struct dlm_rsb ls_stub_rsb; /* for returning errors */ 530 struct dlm_rsb ls_stub_rsb; /* for returning errors */
494 struct dlm_lkb ls_stub_lkb; /* for returning errors */ 531 struct dlm_lkb ls_stub_lkb; /* for returning errors */
495 struct dlm_message ls_stub_ms; /* for faking a reply */ 532 struct dlm_message ls_stub_ms; /* for faking a reply */
@@ -537,6 +574,9 @@ struct dlm_ls {
537 struct list_head ls_root_list; /* root resources */ 574 struct list_head ls_root_list; /* root resources */
538 struct rw_semaphore ls_root_sem; /* protect root_list */ 575 struct rw_semaphore ls_root_sem; /* protect root_list */
539 576
577 const struct dlm_lockspace_ops *ls_ops;
578 void *ls_ops_arg;
579
540 int ls_namelen; 580 int ls_namelen;
541 char ls_name[1]; 581 char ls_name[1];
542}; 582};