diff options
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r-- | fs/gfs2/incore.h | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 525dcae352d6..9c2c0b90b22a 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-2007 Red Hat, Inc. All rights reserved. | 3 | * Copyright (C) 2004-2008 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 |
@@ -44,7 +44,6 @@ struct gfs2_log_header_host { | |||
44 | 44 | ||
45 | struct gfs2_log_operations { | 45 | struct gfs2_log_operations { |
46 | void (*lo_add) (struct gfs2_sbd *sdp, struct gfs2_log_element *le); | 46 | void (*lo_add) (struct gfs2_sbd *sdp, struct gfs2_log_element *le); |
47 | void (*lo_incore_commit) (struct gfs2_sbd *sdp, struct gfs2_trans *tr); | ||
48 | void (*lo_before_commit) (struct gfs2_sbd *sdp); | 47 | void (*lo_before_commit) (struct gfs2_sbd *sdp); |
49 | void (*lo_after_commit) (struct gfs2_sbd *sdp, struct gfs2_ail *ai); | 48 | void (*lo_after_commit) (struct gfs2_sbd *sdp, struct gfs2_ail *ai); |
50 | void (*lo_before_scan) (struct gfs2_jdesc *jd, | 49 | void (*lo_before_scan) (struct gfs2_jdesc *jd, |
@@ -70,7 +69,6 @@ struct gfs2_bitmap { | |||
70 | }; | 69 | }; |
71 | 70 | ||
72 | struct gfs2_rgrp_host { | 71 | struct gfs2_rgrp_host { |
73 | u32 rg_flags; | ||
74 | u32 rg_free; | 72 | u32 rg_free; |
75 | u32 rg_dinodes; | 73 | u32 rg_dinodes; |
76 | u64 rg_igeneration; | 74 | u64 rg_igeneration; |
@@ -87,17 +85,17 @@ struct gfs2_rgrpd { | |||
87 | u32 rd_data; /* num of data blocks in rgrp */ | 85 | u32 rd_data; /* num of data blocks in rgrp */ |
88 | u32 rd_bitbytes; /* number of bytes in data bitmaps */ | 86 | u32 rd_bitbytes; /* number of bytes in data bitmaps */ |
89 | struct gfs2_rgrp_host rd_rg; | 87 | struct gfs2_rgrp_host rd_rg; |
90 | u64 rd_rg_vn; | ||
91 | struct gfs2_bitmap *rd_bits; | 88 | struct gfs2_bitmap *rd_bits; |
92 | unsigned int rd_bh_count; | 89 | unsigned int rd_bh_count; |
93 | struct mutex rd_mutex; | 90 | struct mutex rd_mutex; |
94 | u32 rd_free_clone; | 91 | u32 rd_free_clone; |
95 | struct gfs2_log_element rd_le; | 92 | struct gfs2_log_element rd_le; |
96 | u32 rd_last_alloc_data; | 93 | u32 rd_last_alloc; |
97 | u32 rd_last_alloc_meta; | ||
98 | struct gfs2_sbd *rd_sbd; | 94 | struct gfs2_sbd *rd_sbd; |
99 | unsigned long rd_flags; | 95 | unsigned char rd_flags; |
100 | #define GFS2_RDF_CHECK 0x0001 /* Need to check for unlinked inodes */ | 96 | #define GFS2_RDF_CHECK 0x01 /* Need to check for unlinked inodes */ |
97 | #define GFS2_RDF_NOALLOC 0x02 /* rg prohibits allocation */ | ||
98 | #define GFS2_RDF_UPTODATE 0x04 /* rg is up to date */ | ||
101 | }; | 99 | }; |
102 | 100 | ||
103 | enum gfs2_state_bits { | 101 | enum gfs2_state_bits { |
@@ -168,6 +166,8 @@ enum { | |||
168 | GLF_DIRTY = 5, | 166 | GLF_DIRTY = 5, |
169 | GLF_DEMOTE_IN_PROGRESS = 6, | 167 | GLF_DEMOTE_IN_PROGRESS = 6, |
170 | GLF_LFLUSH = 7, | 168 | GLF_LFLUSH = 7, |
169 | GLF_WAITERS2 = 8, | ||
170 | GLF_CONV_DEADLK = 9, | ||
171 | }; | 171 | }; |
172 | 172 | ||
173 | struct gfs2_glock { | 173 | struct gfs2_glock { |
@@ -187,18 +187,15 @@ struct gfs2_glock { | |||
187 | struct list_head gl_holders; | 187 | struct list_head gl_holders; |
188 | struct list_head gl_waiters1; /* HIF_MUTEX */ | 188 | struct list_head gl_waiters1; /* HIF_MUTEX */ |
189 | struct list_head gl_waiters3; /* HIF_PROMOTE */ | 189 | struct list_head gl_waiters3; /* HIF_PROMOTE */ |
190 | int gl_waiters2; /* GIF_DEMOTE */ | ||
191 | 190 | ||
192 | const struct gfs2_glock_operations *gl_ops; | 191 | const struct gfs2_glock_operations *gl_ops; |
193 | 192 | ||
194 | struct gfs2_holder *gl_req_gh; | 193 | struct gfs2_holder *gl_req_gh; |
195 | gfs2_glop_bh_t gl_req_bh; | ||
196 | 194 | ||
197 | void *gl_lock; | 195 | void *gl_lock; |
198 | char *gl_lvb; | 196 | char *gl_lvb; |
199 | atomic_t gl_lvb_count; | 197 | atomic_t gl_lvb_count; |
200 | 198 | ||
201 | u64 gl_vn; | ||
202 | unsigned long gl_stamp; | 199 | unsigned long gl_stamp; |
203 | unsigned long gl_tchange; | 200 | unsigned long gl_tchange; |
204 | void *gl_object; | 201 | void *gl_object; |
@@ -213,6 +210,8 @@ struct gfs2_glock { | |||
213 | struct delayed_work gl_work; | 210 | struct delayed_work gl_work; |
214 | }; | 211 | }; |
215 | 212 | ||
213 | #define GFS2_MIN_LVB_SIZE 32 /* Min size of LVB that gfs2 supports */ | ||
214 | |||
216 | struct gfs2_alloc { | 215 | struct gfs2_alloc { |
217 | /* Quota stuff */ | 216 | /* Quota stuff */ |
218 | 217 | ||
@@ -241,14 +240,9 @@ enum { | |||
241 | 240 | ||
242 | struct gfs2_dinode_host { | 241 | struct gfs2_dinode_host { |
243 | u64 di_size; /* number of bytes in file */ | 242 | u64 di_size; /* number of bytes in file */ |
244 | u64 di_blocks; /* number of blocks in file */ | ||
245 | u64 di_goal_meta; /* rgrp to alloc from next */ | ||
246 | u64 di_goal_data; /* data block goal */ | ||
247 | u64 di_generation; /* generation number for NFS */ | 243 | u64 di_generation; /* generation number for NFS */ |
248 | u32 di_flags; /* GFS2_DIF_... */ | 244 | u32 di_flags; /* GFS2_DIF_... */ |
249 | u16 di_height; /* height of metadata */ | ||
250 | /* These only apply to directories */ | 245 | /* These only apply to directories */ |
251 | u16 di_depth; /* Number of bits in the table */ | ||
252 | u32 di_entries; /* The number of entries in the directory */ | 246 | u32 di_entries; /* The number of entries in the directory */ |
253 | u64 di_eattr; /* extended attribute block number */ | 247 | u64 di_eattr; /* extended attribute block number */ |
254 | }; | 248 | }; |
@@ -265,9 +259,10 @@ struct gfs2_inode { | |||
265 | struct gfs2_holder i_iopen_gh; | 259 | struct gfs2_holder i_iopen_gh; |
266 | struct gfs2_holder i_gh; /* for prepare/commit_write only */ | 260 | struct gfs2_holder i_gh; /* for prepare/commit_write only */ |
267 | struct gfs2_alloc *i_alloc; | 261 | struct gfs2_alloc *i_alloc; |
268 | u64 i_last_rg_alloc; | 262 | u64 i_goal; /* goal block for allocations */ |
269 | |||
270 | struct rw_semaphore i_rw_mutex; | 263 | struct rw_semaphore i_rw_mutex; |
264 | u8 i_height; | ||
265 | u8 i_depth; | ||
271 | }; | 266 | }; |
272 | 267 | ||
273 | /* | 268 | /* |
@@ -490,9 +485,9 @@ struct gfs2_sbd { | |||
490 | u32 sd_qc_per_block; | 485 | u32 sd_qc_per_block; |
491 | u32 sd_max_dirres; /* Max blocks needed to add a directory entry */ | 486 | u32 sd_max_dirres; /* Max blocks needed to add a directory entry */ |
492 | u32 sd_max_height; /* Max height of a file's metadata tree */ | 487 | u32 sd_max_height; /* Max height of a file's metadata tree */ |
493 | u64 sd_heightsize[GFS2_MAX_META_HEIGHT]; | 488 | u64 sd_heightsize[GFS2_MAX_META_HEIGHT + 1]; |
494 | u32 sd_max_jheight; /* Max height of journaled file's meta tree */ | 489 | u32 sd_max_jheight; /* Max height of journaled file's meta tree */ |
495 | u64 sd_jheightsize[GFS2_MAX_META_HEIGHT]; | 490 | u64 sd_jheightsize[GFS2_MAX_META_HEIGHT + 1]; |
496 | 491 | ||
497 | struct gfs2_args sd_args; /* Mount arguments */ | 492 | struct gfs2_args sd_args; /* Mount arguments */ |
498 | struct gfs2_tune sd_tune; /* Filesystem tuning structure */ | 493 | struct gfs2_tune sd_tune; /* Filesystem tuning structure */ |
@@ -533,7 +528,7 @@ struct gfs2_sbd { | |||
533 | 528 | ||
534 | /* Resource group stuff */ | 529 | /* Resource group stuff */ |
535 | 530 | ||
536 | u64 sd_rindex_vn; | 531 | int sd_rindex_uptodate; |
537 | spinlock_t sd_rindex_spin; | 532 | spinlock_t sd_rindex_spin; |
538 | struct mutex sd_rindex_mutex; | 533 | struct mutex sd_rindex_mutex; |
539 | struct list_head sd_rindex_list; | 534 | struct list_head sd_rindex_list; |
@@ -637,9 +632,6 @@ struct gfs2_sbd { | |||
637 | 632 | ||
638 | /* Counters */ | 633 | /* Counters */ |
639 | 634 | ||
640 | atomic_t sd_glock_count; | ||
641 | atomic_t sd_glock_held_count; | ||
642 | atomic_t sd_inode_count; | ||
643 | atomic_t sd_reclaimed; | 635 | atomic_t sd_reclaimed; |
644 | 636 | ||
645 | char sd_fsname[GFS2_FSNAME_LEN]; | 637 | char sd_fsname[GFS2_FSNAME_LEN]; |