diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-01-30 18:38:24 -0500 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-04-18 11:56:04 -0400 |
commit | 19fdb624dc8ccb663f6e48b3a3a3fa4e4e567fc1 (patch) | |
tree | b50e358686ca63789af4af07526e0d21f2806bfb /fs/ocfs2/slot_map.c | |
parent | 4670c46ded9a18268d1265417ff4ac72145a7917 (diff) |
ocfs2: Abstract out node number queries.
ocfs2 asks the cluster stack for the local node's node number for two
reasons; to fill the slot map and to print it. While the slot map isn't
necessary for userspace cluster stacks, the printing is very nice for
debugging. Thus we add ocfs2_cluster_this_node() as a generic API to get
this value. It is anticipated that the slot map will not be used under a
userspace cluster stack, so validity checks of the node num only need to
exist in the slot map code. Otherwise, it just gets used and printed as an
opaque value.
[ Fixed up some "int" versus "unsigned int" issues and made osb->node_num
truly opaque. --Mark ]
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/slot_map.c')
-rw-r--r-- | fs/ocfs2/slot_map.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ocfs2/slot_map.c b/fs/ocfs2/slot_map.c index 63fb1b26d964..bb5ff8939bf1 100644 --- a/fs/ocfs2/slot_map.c +++ b/fs/ocfs2/slot_map.c | |||
@@ -73,8 +73,6 @@ static void ocfs2_set_slot(struct ocfs2_slot_info *si, | |||
73 | int slot_num, unsigned int node_num) | 73 | int slot_num, unsigned int node_num) |
74 | { | 74 | { |
75 | BUG_ON((slot_num < 0) || (slot_num >= si->si_num_slots)); | 75 | BUG_ON((slot_num < 0) || (slot_num >= si->si_num_slots)); |
76 | BUG_ON((node_num == O2NM_INVALID_NODE_NUM) || | ||
77 | (node_num >= O2NM_MAX_NODES)); | ||
78 | 76 | ||
79 | si->si_slots[slot_num].sl_valid = 1; | 77 | si->si_slots[slot_num].sl_valid = 1; |
80 | si->si_slots[slot_num].sl_node_num = node_num; | 78 | si->si_slots[slot_num].sl_node_num = node_num; |