diff options
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r-- | fs/gfs2/incore.h | 47 |
1 files changed, 16 insertions, 31 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index eaddfb5a8e6f..513aaf0dc0ab 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | 2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
3 | * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. | 3 | * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. |
4 | * | 4 | * |
5 | * This copyrighted material is made available to anyone wishing to use, | 5 | * This copyrighted material is made available to anyone wishing to use, |
6 | * modify, copy, or redistribute it subject to the terms and conditions | 6 | * modify, copy, or redistribute it subject to the terms and conditions |
@@ -131,7 +131,6 @@ struct gfs2_bufdata { | |||
131 | struct gfs2_glock_operations { | 131 | struct gfs2_glock_operations { |
132 | void (*go_xmote_th) (struct gfs2_glock *gl); | 132 | void (*go_xmote_th) (struct gfs2_glock *gl); |
133 | void (*go_xmote_bh) (struct gfs2_glock *gl); | 133 | void (*go_xmote_bh) (struct gfs2_glock *gl); |
134 | void (*go_drop_th) (struct gfs2_glock *gl); | ||
135 | void (*go_inval) (struct gfs2_glock *gl, int flags); | 134 | void (*go_inval) (struct gfs2_glock *gl, int flags); |
136 | int (*go_demote_ok) (struct gfs2_glock *gl); | 135 | int (*go_demote_ok) (struct gfs2_glock *gl); |
137 | int (*go_lock) (struct gfs2_holder *gh); | 136 | int (*go_lock) (struct gfs2_holder *gh); |
@@ -141,10 +140,6 @@ struct gfs2_glock_operations { | |||
141 | }; | 140 | }; |
142 | 141 | ||
143 | enum { | 142 | enum { |
144 | /* Actions */ | ||
145 | HIF_MUTEX = 0, | ||
146 | HIF_PROMOTE = 1, | ||
147 | |||
148 | /* States */ | 143 | /* States */ |
149 | HIF_HOLDER = 6, | 144 | HIF_HOLDER = 6, |
150 | HIF_FIRST = 7, | 145 | HIF_FIRST = 7, |
@@ -171,6 +166,8 @@ enum { | |||
171 | GLF_DEMOTE = 3, | 166 | GLF_DEMOTE = 3, |
172 | GLF_PENDING_DEMOTE = 4, | 167 | GLF_PENDING_DEMOTE = 4, |
173 | GLF_DIRTY = 5, | 168 | GLF_DIRTY = 5, |
169 | GLF_DEMOTE_IN_PROGRESS = 6, | ||
170 | GLF_LFLUSH = 7, | ||
174 | }; | 171 | }; |
175 | 172 | ||
176 | struct gfs2_glock { | 173 | struct gfs2_glock { |
@@ -190,6 +187,7 @@ struct gfs2_glock { | |||
190 | struct list_head gl_holders; | 187 | struct list_head gl_holders; |
191 | struct list_head gl_waiters1; /* HIF_MUTEX */ | 188 | struct list_head gl_waiters1; /* HIF_MUTEX */ |
192 | struct list_head gl_waiters3; /* HIF_PROMOTE */ | 189 | struct list_head gl_waiters3; /* HIF_PROMOTE */ |
190 | int gl_waiters2; /* GIF_DEMOTE */ | ||
193 | 191 | ||
194 | const struct gfs2_glock_operations *gl_ops; | 192 | const struct gfs2_glock_operations *gl_ops; |
195 | 193 | ||
@@ -210,7 +208,6 @@ struct gfs2_glock { | |||
210 | struct gfs2_sbd *gl_sbd; | 208 | struct gfs2_sbd *gl_sbd; |
211 | 209 | ||
212 | struct inode *gl_aspace; | 210 | struct inode *gl_aspace; |
213 | struct gfs2_log_element gl_le; | ||
214 | struct list_head gl_ail_list; | 211 | struct list_head gl_ail_list; |
215 | atomic_t gl_ail_count; | 212 | atomic_t gl_ail_count; |
216 | struct delayed_work gl_work; | 213 | struct delayed_work gl_work; |
@@ -239,7 +236,6 @@ struct gfs2_alloc { | |||
239 | enum { | 236 | enum { |
240 | GIF_INVALID = 0, | 237 | GIF_INVALID = 0, |
241 | GIF_QD_LOCKED = 1, | 238 | GIF_QD_LOCKED = 1, |
242 | GIF_PAGED = 2, | ||
243 | GIF_SW_PAGED = 3, | 239 | GIF_SW_PAGED = 3, |
244 | }; | 240 | }; |
245 | 241 | ||
@@ -268,14 +264,10 @@ struct gfs2_inode { | |||
268 | struct gfs2_glock *i_gl; /* Move into i_gh? */ | 264 | struct gfs2_glock *i_gl; /* Move into i_gh? */ |
269 | struct gfs2_holder i_iopen_gh; | 265 | struct gfs2_holder i_iopen_gh; |
270 | struct gfs2_holder i_gh; /* for prepare/commit_write only */ | 266 | struct gfs2_holder i_gh; /* for prepare/commit_write only */ |
271 | struct gfs2_alloc i_alloc; | 267 | struct gfs2_alloc *i_alloc; |
272 | u64 i_last_rg_alloc; | 268 | u64 i_last_rg_alloc; |
273 | 269 | ||
274 | spinlock_t i_spin; | ||
275 | struct rw_semaphore i_rw_mutex; | 270 | struct rw_semaphore i_rw_mutex; |
276 | unsigned long i_last_pfault; | ||
277 | |||
278 | struct buffer_head *i_cache[GFS2_MAX_META_HEIGHT]; | ||
279 | }; | 271 | }; |
280 | 272 | ||
281 | /* | 273 | /* |
@@ -287,19 +279,12 @@ static inline struct gfs2_inode *GFS2_I(struct inode *inode) | |||
287 | return container_of(inode, struct gfs2_inode, i_inode); | 279 | return container_of(inode, struct gfs2_inode, i_inode); |
288 | } | 280 | } |
289 | 281 | ||
290 | /* To be removed? */ | 282 | static inline struct gfs2_sbd *GFS2_SB(const struct inode *inode) |
291 | static inline struct gfs2_sbd *GFS2_SB(struct inode *inode) | ||
292 | { | 283 | { |
293 | return inode->i_sb->s_fs_info; | 284 | return inode->i_sb->s_fs_info; |
294 | } | 285 | } |
295 | 286 | ||
296 | enum { | ||
297 | GFF_DID_DIRECT_ALLOC = 0, | ||
298 | GFF_EXLOCK = 1, | ||
299 | }; | ||
300 | |||
301 | struct gfs2_file { | 287 | struct gfs2_file { |
302 | unsigned long f_flags; /* GFF_... */ | ||
303 | struct mutex f_fl_mutex; | 288 | struct mutex f_fl_mutex; |
304 | struct gfs2_holder f_fl_gh; | 289 | struct gfs2_holder f_fl_gh; |
305 | }; | 290 | }; |
@@ -373,8 +358,17 @@ struct gfs2_ail { | |||
373 | u64 ai_sync_gen; | 358 | u64 ai_sync_gen; |
374 | }; | 359 | }; |
375 | 360 | ||
361 | struct gfs2_journal_extent { | ||
362 | struct list_head extent_list; | ||
363 | |||
364 | unsigned int lblock; /* First logical block */ | ||
365 | u64 dblock; /* First disk block */ | ||
366 | u64 blocks; | ||
367 | }; | ||
368 | |||
376 | struct gfs2_jdesc { | 369 | struct gfs2_jdesc { |
377 | struct list_head jd_list; | 370 | struct list_head jd_list; |
371 | struct list_head extent_list; | ||
378 | 372 | ||
379 | struct inode *jd_inode; | 373 | struct inode *jd_inode; |
380 | unsigned int jd_jid; | 374 | unsigned int jd_jid; |
@@ -421,13 +415,9 @@ struct gfs2_args { | |||
421 | struct gfs2_tune { | 415 | struct gfs2_tune { |
422 | spinlock_t gt_spin; | 416 | spinlock_t gt_spin; |
423 | 417 | ||
424 | unsigned int gt_ilimit; | ||
425 | unsigned int gt_ilimit_tries; | ||
426 | unsigned int gt_ilimit_min; | ||
427 | unsigned int gt_demote_secs; /* Cache retention for unheld glock */ | 418 | unsigned int gt_demote_secs; /* Cache retention for unheld glock */ |
428 | unsigned int gt_incore_log_blocks; | 419 | unsigned int gt_incore_log_blocks; |
429 | unsigned int gt_log_flush_secs; | 420 | unsigned int gt_log_flush_secs; |
430 | unsigned int gt_jindex_refresh_secs; /* Check for new journal index */ | ||
431 | 421 | ||
432 | unsigned int gt_recoverd_secs; | 422 | unsigned int gt_recoverd_secs; |
433 | unsigned int gt_logd_secs; | 423 | unsigned int gt_logd_secs; |
@@ -443,10 +433,8 @@ struct gfs2_tune { | |||
443 | unsigned int gt_new_files_jdata; | 433 | unsigned int gt_new_files_jdata; |
444 | unsigned int gt_new_files_directio; | 434 | unsigned int gt_new_files_directio; |
445 | unsigned int gt_max_readahead; /* Max bytes to read-ahead from disk */ | 435 | unsigned int gt_max_readahead; /* Max bytes to read-ahead from disk */ |
446 | unsigned int gt_lockdump_size; | ||
447 | unsigned int gt_stall_secs; /* Detects trouble! */ | 436 | unsigned int gt_stall_secs; /* Detects trouble! */ |
448 | unsigned int gt_complain_secs; | 437 | unsigned int gt_complain_secs; |
449 | unsigned int gt_reclaim_limit; /* Max num of glocks in reclaim list */ | ||
450 | unsigned int gt_statfs_quantum; | 438 | unsigned int gt_statfs_quantum; |
451 | unsigned int gt_statfs_slow; | 439 | unsigned int gt_statfs_slow; |
452 | }; | 440 | }; |
@@ -539,7 +527,6 @@ struct gfs2_sbd { | |||
539 | /* StatFS stuff */ | 527 | /* StatFS stuff */ |
540 | 528 | ||
541 | spinlock_t sd_statfs_spin; | 529 | spinlock_t sd_statfs_spin; |
542 | struct mutex sd_statfs_mutex; | ||
543 | struct gfs2_statfs_change_host sd_statfs_master; | 530 | struct gfs2_statfs_change_host sd_statfs_master; |
544 | struct gfs2_statfs_change_host sd_statfs_local; | 531 | struct gfs2_statfs_change_host sd_statfs_local; |
545 | unsigned long sd_statfs_sync_time; | 532 | unsigned long sd_statfs_sync_time; |
@@ -602,20 +589,18 @@ struct gfs2_sbd { | |||
602 | unsigned int sd_log_commited_databuf; | 589 | unsigned int sd_log_commited_databuf; |
603 | unsigned int sd_log_commited_revoke; | 590 | unsigned int sd_log_commited_revoke; |
604 | 591 | ||
605 | unsigned int sd_log_num_gl; | ||
606 | unsigned int sd_log_num_buf; | 592 | unsigned int sd_log_num_buf; |
607 | unsigned int sd_log_num_revoke; | 593 | unsigned int sd_log_num_revoke; |
608 | unsigned int sd_log_num_rg; | 594 | unsigned int sd_log_num_rg; |
609 | unsigned int sd_log_num_databuf; | 595 | unsigned int sd_log_num_databuf; |
610 | 596 | ||
611 | struct list_head sd_log_le_gl; | ||
612 | struct list_head sd_log_le_buf; | 597 | struct list_head sd_log_le_buf; |
613 | struct list_head sd_log_le_revoke; | 598 | struct list_head sd_log_le_revoke; |
614 | struct list_head sd_log_le_rg; | 599 | struct list_head sd_log_le_rg; |
615 | struct list_head sd_log_le_databuf; | 600 | struct list_head sd_log_le_databuf; |
616 | struct list_head sd_log_le_ordered; | 601 | struct list_head sd_log_le_ordered; |
617 | 602 | ||
618 | unsigned int sd_log_blks_free; | 603 | atomic_t sd_log_blks_free; |
619 | struct mutex sd_log_reserve_mutex; | 604 | struct mutex sd_log_reserve_mutex; |
620 | 605 | ||
621 | u64 sd_log_sequence; | 606 | u64 sd_log_sequence; |