aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2.h
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-02-01 15:03:57 -0500
committerMark Fasheh <mfasheh@suse.com>2008-04-18 11:56:02 -0400
commit553abd046af609191a91af7289d87d477adc659f (patch)
treecff21f65d49c0041993095a051edf76840c2af28 /fs/ocfs2/ocfs2.h
parentd85b20e4b300edfd290f21fc2d790ba16d2f225b (diff)
ocfs2: Change the recovery map to an array of node numbers.
The old recovery map was a bitmap of node numbers. This was sufficient for the maximum node number of 254. Going forward, we want node numbers to be UINT32. Thus, we need a new recovery map. Note that we can't keep track of slots here. We must write down the node number to recovery *before* we get the locks needed to convert a node number into a slot number. The recovery map is now an array of unsigned ints, max_slots in size. It moves to journal.c with the rest of recovery. Because it needs to be initialized, we move all of recovery initialization into a new function, ocfs2_recovery_init(). This actually cleans up ocfs2_initialize_super() a little as well. Following on, recovery cleaup becomes part of ocfs2_recovery_exit(). A number of node map functions are rendered obsolete and are removed. Finally, waiting on recovery is wrapped in a function rather than naked checks on the recovery_event. This is a cleanup from Mark. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/ocfs2.h')
-rw-r--r--fs/ocfs2/ocfs2.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
index ee3f675a4210..c6ed8c35de0d 100644
--- a/fs/ocfs2/ocfs2.h
+++ b/fs/ocfs2/ocfs2.h
@@ -180,6 +180,7 @@ enum ocfs2_mount_options
180 180
181struct ocfs2_journal; 181struct ocfs2_journal;
182struct ocfs2_slot_info; 182struct ocfs2_slot_info;
183struct ocfs2_recovery_map;
183struct ocfs2_super 184struct ocfs2_super
184{ 185{
185 struct task_struct *commit_task; 186 struct task_struct *commit_task;
@@ -191,7 +192,6 @@ struct ocfs2_super
191 struct ocfs2_slot_info *slot_info; 192 struct ocfs2_slot_info *slot_info;
192 193
193 spinlock_t node_map_lock; 194 spinlock_t node_map_lock;
194 struct ocfs2_node_map recovery_map;
195 195
196 u64 root_blkno; 196 u64 root_blkno;
197 u64 system_dir_blkno; 197 u64 system_dir_blkno;
@@ -226,6 +226,7 @@ struct ocfs2_super
226 226
227 atomic_t vol_state; 227 atomic_t vol_state;
228 struct mutex recovery_lock; 228 struct mutex recovery_lock;
229 struct ocfs2_recovery_map *recovery_map;
229 struct task_struct *recovery_thread_task; 230 struct task_struct *recovery_thread_task;
230 int disable_recovery; 231 int disable_recovery;
231 wait_queue_head_t checkpoint_event; 232 wait_queue_head_t checkpoint_event;