diff options
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r-- | fs/gfs2/incore.h | 59 |
1 files changed, 54 insertions, 5 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index a0117d6eb145..0af7c24de6a1 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h | |||
@@ -12,6 +12,8 @@ | |||
12 | 12 | ||
13 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/workqueue.h> | 14 | #include <linux/workqueue.h> |
15 | #include <linux/dlm.h> | ||
16 | #include <linux/buffer_head.h> | ||
15 | 17 | ||
16 | #define DIO_WAIT 0x00000010 | 18 | #define DIO_WAIT 0x00000010 |
17 | #define DIO_METADATA 0x00000020 | 19 | #define DIO_METADATA 0x00000020 |
@@ -26,6 +28,7 @@ struct gfs2_trans; | |||
26 | struct gfs2_ail; | 28 | struct gfs2_ail; |
27 | struct gfs2_jdesc; | 29 | struct gfs2_jdesc; |
28 | struct gfs2_sbd; | 30 | struct gfs2_sbd; |
31 | struct lm_lockops; | ||
29 | 32 | ||
30 | typedef void (*gfs2_glop_bh_t) (struct gfs2_glock *gl, unsigned int ret); | 33 | typedef void (*gfs2_glop_bh_t) (struct gfs2_glock *gl, unsigned int ret); |
31 | 34 | ||
@@ -121,6 +124,28 @@ struct gfs2_bufdata { | |||
121 | struct list_head bd_ail_gl_list; | 124 | struct list_head bd_ail_gl_list; |
122 | }; | 125 | }; |
123 | 126 | ||
127 | /* | ||
128 | * Internally, we prefix things with gdlm_ and GDLM_ (for gfs-dlm) since a | ||
129 | * prefix of lock_dlm_ gets awkward. | ||
130 | */ | ||
131 | |||
132 | #define GDLM_STRNAME_BYTES 25 | ||
133 | #define GDLM_LVB_SIZE 32 | ||
134 | |||
135 | enum { | ||
136 | DFL_BLOCK_LOCKS = 0, | ||
137 | }; | ||
138 | |||
139 | struct lm_lockname { | ||
140 | u64 ln_number; | ||
141 | unsigned int ln_type; | ||
142 | }; | ||
143 | |||
144 | #define lm_name_equal(name1, name2) \ | ||
145 | (((name1)->ln_number == (name2)->ln_number) && \ | ||
146 | ((name1)->ln_type == (name2)->ln_type)) | ||
147 | |||
148 | |||
124 | struct gfs2_glock_operations { | 149 | struct gfs2_glock_operations { |
125 | void (*go_xmote_th) (struct gfs2_glock *gl); | 150 | void (*go_xmote_th) (struct gfs2_glock *gl); |
126 | int (*go_xmote_bh) (struct gfs2_glock *gl, struct gfs2_holder *gh); | 151 | int (*go_xmote_bh) (struct gfs2_glock *gl, struct gfs2_holder *gh); |
@@ -162,6 +187,8 @@ enum { | |||
162 | GLF_LFLUSH = 7, | 187 | GLF_LFLUSH = 7, |
163 | GLF_INVALIDATE_IN_PROGRESS = 8, | 188 | GLF_INVALIDATE_IN_PROGRESS = 8, |
164 | GLF_REPLY_PENDING = 9, | 189 | GLF_REPLY_PENDING = 9, |
190 | GLF_INITIAL = 10, | ||
191 | GLF_FROZEN = 11, | ||
165 | }; | 192 | }; |
166 | 193 | ||
167 | struct gfs2_glock { | 194 | struct gfs2_glock { |
@@ -181,10 +208,9 @@ struct gfs2_glock { | |||
181 | struct list_head gl_holders; | 208 | struct list_head gl_holders; |
182 | 209 | ||
183 | const struct gfs2_glock_operations *gl_ops; | 210 | const struct gfs2_glock_operations *gl_ops; |
184 | void *gl_lock; | 211 | char gl_strname[GDLM_STRNAME_BYTES]; |
185 | char *gl_lvb; | 212 | struct dlm_lksb gl_lksb; |
186 | atomic_t gl_lvb_count; | 213 | char gl_lvb[32]; |
187 | |||
188 | unsigned long gl_stamp; | 214 | unsigned long gl_stamp; |
189 | unsigned long gl_tchange; | 215 | unsigned long gl_tchange; |
190 | void *gl_object; | 216 | void *gl_object; |
@@ -447,6 +473,30 @@ struct gfs2_sb_host { | |||
447 | char sb_locktable[GFS2_LOCKNAME_LEN]; | 473 | char sb_locktable[GFS2_LOCKNAME_LEN]; |
448 | }; | 474 | }; |
449 | 475 | ||
476 | /* | ||
477 | * lm_mount() return values | ||
478 | * | ||
479 | * ls_jid - the journal ID this node should use | ||
480 | * ls_first - this node is the first to mount the file system | ||
481 | * ls_lockspace - lock module's context for this file system | ||
482 | * ls_ops - lock module's functions | ||
483 | */ | ||
484 | |||
485 | struct lm_lockstruct { | ||
486 | u32 ls_id; | ||
487 | unsigned int ls_jid; | ||
488 | unsigned int ls_first; | ||
489 | unsigned int ls_first_done; | ||
490 | unsigned int ls_nodir; | ||
491 | const struct lm_lockops *ls_ops; | ||
492 | unsigned long ls_flags; | ||
493 | dlm_lockspace_t *ls_dlm; | ||
494 | |||
495 | int ls_recover_jid; | ||
496 | int ls_recover_jid_done; | ||
497 | int ls_recover_jid_status; | ||
498 | }; | ||
499 | |||
450 | struct gfs2_sbd { | 500 | struct gfs2_sbd { |
451 | struct super_block *sd_vfs; | 501 | struct super_block *sd_vfs; |
452 | struct kobject sd_kobj; | 502 | struct kobject sd_kobj; |
@@ -520,7 +570,6 @@ struct gfs2_sbd { | |||
520 | spinlock_t sd_jindex_spin; | 570 | spinlock_t sd_jindex_spin; |
521 | struct mutex sd_jindex_mutex; | 571 | struct mutex sd_jindex_mutex; |
522 | unsigned int sd_journals; | 572 | unsigned int sd_journals; |
523 | unsigned long sd_jindex_refresh_time; | ||
524 | 573 | ||
525 | struct gfs2_jdesc *sd_jdesc; | 574 | struct gfs2_jdesc *sd_jdesc; |
526 | struct gfs2_holder sd_journal_gh; | 575 | struct gfs2_holder sd_journal_gh; |