diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-02-01 15:03:57 -0500 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-04-18 11:56:02 -0400 |
commit | 553abd046af609191a91af7289d87d477adc659f (patch) | |
tree | cff21f65d49c0041993095a051edf76840c2af28 /fs/ocfs2/heartbeat.h | |
parent | d85b20e4b300edfd290f21fc2d790ba16d2f225b (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/heartbeat.h')
-rw-r--r-- | fs/ocfs2/heartbeat.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/fs/ocfs2/heartbeat.h b/fs/ocfs2/heartbeat.h index eac63aed7611..98d8ffc995b1 100644 --- a/fs/ocfs2/heartbeat.h +++ b/fs/ocfs2/heartbeat.h | |||
@@ -33,8 +33,6 @@ void ocfs2_stop_heartbeat(struct ocfs2_super *osb); | |||
33 | 33 | ||
34 | /* node map functions - used to keep track of mounted and in-recovery | 34 | /* node map functions - used to keep track of mounted and in-recovery |
35 | * nodes. */ | 35 | * nodes. */ |
36 | int ocfs2_node_map_is_empty(struct ocfs2_super *osb, | ||
37 | struct ocfs2_node_map *map); | ||
38 | void ocfs2_node_map_set_bit(struct ocfs2_super *osb, | 36 | void ocfs2_node_map_set_bit(struct ocfs2_super *osb, |
39 | struct ocfs2_node_map *map, | 37 | struct ocfs2_node_map *map, |
40 | int bit); | 38 | int bit); |
@@ -44,17 +42,5 @@ void ocfs2_node_map_clear_bit(struct ocfs2_super *osb, | |||
44 | int ocfs2_node_map_test_bit(struct ocfs2_super *osb, | 42 | int ocfs2_node_map_test_bit(struct ocfs2_super *osb, |
45 | struct ocfs2_node_map *map, | 43 | struct ocfs2_node_map *map, |
46 | int bit); | 44 | int bit); |
47 | int ocfs2_node_map_iterate(struct ocfs2_super *osb, | ||
48 | struct ocfs2_node_map *map, | ||
49 | int idx); | ||
50 | static inline int ocfs2_node_map_first_set_bit(struct ocfs2_super *osb, | ||
51 | struct ocfs2_node_map *map) | ||
52 | { | ||
53 | return ocfs2_node_map_iterate(osb, map, 0); | ||
54 | } | ||
55 | int ocfs2_recovery_map_set(struct ocfs2_super *osb, | ||
56 | int num); | ||
57 | void ocfs2_recovery_map_clear(struct ocfs2_super *osb, | ||
58 | int num); | ||
59 | 45 | ||
60 | #endif /* OCFS2_HEARTBEAT_H */ | 46 | #endif /* OCFS2_HEARTBEAT_H */ |