diff options
author | Joel Becker <joel.becker@oracle.com> | 2007-06-15 00:40:49 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-07-10 20:19:40 -0400 |
commit | 14829422be6d6b6721f61b1e749acf5a9cb664d8 (patch) | |
tree | 4a8c931b431653aa5e35523f43ebcddffa8641b8 /fs/ocfs2/heartbeat.c | |
parent | 631d1febab8e546e3bb800bdfe2c212b8adf87de (diff) |
ocfs2: Depend on configfs heartbeat items.
ocfs2 mounts require a heartbeat region. Use the new configfs_depend_item()
facility to actually depend on them so they can't go away from under us.
First, teach cluster/nodemanager.c to depend an item on the o2cb subsystem.
Then teach o2hb_register_callbacks to take a UUID and depend on the
appropriate region. Finally, teach all users of o2hb to pass a UUID or
NULL if they don't require a pin.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/heartbeat.c')
-rw-r--r-- | fs/ocfs2/heartbeat.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ocfs2/heartbeat.c b/fs/ocfs2/heartbeat.c index b25ef63781ba..352eb4a13f98 100644 --- a/fs/ocfs2/heartbeat.c +++ b/fs/ocfs2/heartbeat.c | |||
@@ -157,16 +157,16 @@ int ocfs2_register_hb_callbacks(struct ocfs2_super *osb) | |||
157 | if (ocfs2_mount_local(osb)) | 157 | if (ocfs2_mount_local(osb)) |
158 | return 0; | 158 | return 0; |
159 | 159 | ||
160 | status = o2hb_register_callback(&osb->osb_hb_down); | 160 | status = o2hb_register_callback(osb->uuid_str, &osb->osb_hb_down); |
161 | if (status < 0) { | 161 | if (status < 0) { |
162 | mlog_errno(status); | 162 | mlog_errno(status); |
163 | goto bail; | 163 | goto bail; |
164 | } | 164 | } |
165 | 165 | ||
166 | status = o2hb_register_callback(&osb->osb_hb_up); | 166 | status = o2hb_register_callback(osb->uuid_str, &osb->osb_hb_up); |
167 | if (status < 0) { | 167 | if (status < 0) { |
168 | mlog_errno(status); | 168 | mlog_errno(status); |
169 | o2hb_unregister_callback(&osb->osb_hb_down); | 169 | o2hb_unregister_callback(osb->uuid_str, &osb->osb_hb_down); |
170 | } | 170 | } |
171 | 171 | ||
172 | bail: | 172 | bail: |
@@ -178,8 +178,8 @@ void ocfs2_clear_hb_callbacks(struct ocfs2_super *osb) | |||
178 | if (ocfs2_mount_local(osb)) | 178 | if (ocfs2_mount_local(osb)) |
179 | return; | 179 | return; |
180 | 180 | ||
181 | o2hb_unregister_callback(&osb->osb_hb_down); | 181 | o2hb_unregister_callback(osb->uuid_str, &osb->osb_hb_down); |
182 | o2hb_unregister_callback(&osb->osb_hb_up); | 182 | o2hb_unregister_callback(osb->uuid_str, &osb->osb_hb_up); |
183 | } | 183 | } |
184 | 184 | ||
185 | void ocfs2_stop_heartbeat(struct ocfs2_super *osb) | 185 | void ocfs2_stop_heartbeat(struct ocfs2_super *osb) |