aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/incore.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r--fs/gfs2/incore.h48
1 files changed, 12 insertions, 36 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 8caefec88854..9a67a5954126 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -33,7 +33,6 @@ struct gfs2_inode;
33struct gfs2_file; 33struct gfs2_file;
34struct gfs2_revoke; 34struct gfs2_revoke;
35struct gfs2_revoke_replay; 35struct gfs2_revoke_replay;
36struct gfs2_unlinked;
37struct gfs2_quota_data; 36struct gfs2_quota_data;
38struct gfs2_log_buf; 37struct gfs2_log_buf;
39struct gfs2_trans; 38struct gfs2_trans;
@@ -245,16 +244,12 @@ struct gfs2_inode {
245 struct inode i_inode; 244 struct inode i_inode;
246 struct gfs2_inum i_num; 245 struct gfs2_inum i_num;
247 246
248 atomic_t i_count;
249 unsigned long i_flags; /* GIF_... */ 247 unsigned long i_flags; /* GIF_... */
250 248
251 uint64_t i_vn; 249 uint64_t i_vn;
252 struct gfs2_dinode i_di; 250 struct gfs2_dinode i_di; /* To be replaced by ref to block */
253
254 struct gfs2_glock *i_gl;
255 struct gfs2_sbd *i_sbd;
256 struct inode *i_vnode;
257 251
252 struct gfs2_glock *i_gl; /* Move into i_gh? */
258 struct gfs2_holder i_iopen_gh; 253 struct gfs2_holder i_iopen_gh;
259 struct gfs2_holder i_gh; /* for prepare/commit_write only */ 254 struct gfs2_holder i_gh; /* for prepare/commit_write only */
260 struct gfs2_alloc i_alloc; 255 struct gfs2_alloc i_alloc;
@@ -262,18 +257,27 @@ struct gfs2_inode {
262 257
263 spinlock_t i_spin; 258 spinlock_t i_spin;
264 struct rw_semaphore i_rw_mutex; 259 struct rw_semaphore i_rw_mutex;
265
266 unsigned int i_greedy; 260 unsigned int i_greedy;
267 unsigned long i_last_pfault; 261 unsigned long i_last_pfault;
268 262
269 struct buffer_head *i_cache[GFS2_MAX_META_HEIGHT]; 263 struct buffer_head *i_cache[GFS2_MAX_META_HEIGHT];
270}; 264};
271 265
266/*
267 * Since i_inode is the first element of struct gfs2_inode,
268 * this is effectively a cast.
269 */
272static inline struct gfs2_inode *GFS2_I(struct inode *inode) 270static inline struct gfs2_inode *GFS2_I(struct inode *inode)
273{ 271{
274 return container_of(inode, struct gfs2_inode, i_inode); 272 return container_of(inode, struct gfs2_inode, i_inode);
275} 273}
276 274
275/* To be removed? */
276static inline struct gfs2_sbd *GFS2_SB(struct inode *inode)
277{
278 return inode->i_sb->s_fs_info;
279}
280
277enum { 281enum {
278 GFF_DID_DIRECT_ALLOC = 0, 282 GFF_DID_DIRECT_ALLOC = 0,
279}; 283};
@@ -296,18 +300,6 @@ struct gfs2_revoke_replay {
296}; 300};
297 301
298enum { 302enum {
299 ULF_LOCKED = 0,
300};
301
302struct gfs2_unlinked {
303 struct list_head ul_list;
304 unsigned int ul_count;
305 struct gfs2_unlinked_tag ul_ut;
306 unsigned long ul_flags; /* ULF_... */
307 unsigned int ul_slot;
308};
309
310enum {
311 QDF_USER = 0, 303 QDF_USER = 0,
312 QDF_CHANGE = 1, 304 QDF_CHANGE = 1,
313 QDF_LOCKED = 2, 305 QDF_LOCKED = 2,
@@ -436,7 +428,6 @@ struct gfs2_tune {
436 unsigned int gt_recoverd_secs; 428 unsigned int gt_recoverd_secs;
437 unsigned int gt_logd_secs; 429 unsigned int gt_logd_secs;
438 unsigned int gt_quotad_secs; 430 unsigned int gt_quotad_secs;
439 unsigned int gt_inoded_secs;
440 431
441 unsigned int gt_quota_simul_sync; /* Max quotavals to sync at once */ 432 unsigned int gt_quota_simul_sync; /* Max quotavals to sync at once */
442 unsigned int gt_quota_warn_period; /* Secs between quota warn msgs */ 433 unsigned int gt_quota_warn_period; /* Secs between quota warn msgs */
@@ -495,7 +486,6 @@ struct gfs2_sbd {
495 uint32_t sd_hash_bsize; /* sizeof(exhash block) */ 486 uint32_t sd_hash_bsize; /* sizeof(exhash block) */
496 uint32_t sd_hash_bsize_shift; 487 uint32_t sd_hash_bsize_shift;
497 uint32_t sd_hash_ptrs; /* Number of pointers in a hash block */ 488 uint32_t sd_hash_ptrs; /* Number of pointers in a hash block */
498 uint32_t sd_ut_per_block;
499 uint32_t sd_qc_per_block; 489 uint32_t sd_qc_per_block;
500 uint32_t sd_max_dirres; /* Max blocks needed to add a directory entry */ 490 uint32_t sd_max_dirres; /* Max blocks needed to add a directory entry */
501 uint32_t sd_max_height; /* Max height of a file's metadata tree */ 491 uint32_t sd_max_height; /* Max height of a file's metadata tree */
@@ -527,7 +517,6 @@ struct gfs2_sbd {
527 struct inode *sd_statfs_inode; 517 struct inode *sd_statfs_inode;
528 struct inode *sd_ir_inode; 518 struct inode *sd_ir_inode;
529 struct inode *sd_sc_inode; 519 struct inode *sd_sc_inode;
530 struct inode *sd_ut_inode;
531 struct inode *sd_qc_inode; 520 struct inode *sd_qc_inode;
532 struct inode *sd_rindex; 521 struct inode *sd_rindex;
533 struct inode *sd_quota_inode; 522 struct inode *sd_quota_inode;
@@ -569,7 +558,6 @@ struct gfs2_sbd {
569 558
570 struct gfs2_holder sd_ir_gh; 559 struct gfs2_holder sd_ir_gh;
571 struct gfs2_holder sd_sc_gh; 560 struct gfs2_holder sd_sc_gh;
572 struct gfs2_holder sd_ut_gh;
573 struct gfs2_holder sd_qc_gh; 561 struct gfs2_holder sd_qc_gh;
574 562
575 /* Daemon stuff */ 563 /* Daemon stuff */
@@ -578,21 +566,9 @@ struct gfs2_sbd {
578 struct task_struct *sd_recoverd_process; 566 struct task_struct *sd_recoverd_process;
579 struct task_struct *sd_logd_process; 567 struct task_struct *sd_logd_process;
580 struct task_struct *sd_quotad_process; 568 struct task_struct *sd_quotad_process;
581 struct task_struct *sd_inoded_process;
582 struct task_struct *sd_glockd_process[GFS2_GLOCKD_MAX]; 569 struct task_struct *sd_glockd_process[GFS2_GLOCKD_MAX];
583 unsigned int sd_glockd_num; 570 unsigned int sd_glockd_num;
584 571
585 /* Unlinked inode stuff */
586
587 struct list_head sd_unlinked_list;
588 atomic_t sd_unlinked_count;
589 spinlock_t sd_unlinked_spin;
590 struct mutex sd_unlinked_mutex;
591
592 unsigned int sd_unlinked_slots;
593 unsigned int sd_unlinked_chunks;
594 unsigned char **sd_unlinked_bitmap;
595
596 /* Quota stuff */ 572 /* Quota stuff */
597 573
598 struct list_head sd_quota_list; 574 struct list_head sd_quota_list;