ocfs2/cluster: Pin the local node when o2hb thread starts
The patch pins the node item of the local node when the o2hb thread starts and unpins on stop. An earlier patch pinned the node item of the remote node on o2net connect and unpinned on disconnect. Signed-off-by Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
This commit is contained in:
parent
cb0586bd4c
commit
cfc069d3fa
|
@ -1083,6 +1083,9 @@ static int o2hb_thread(void *data)
|
||||||
|
|
||||||
set_user_nice(current, -20);
|
set_user_nice(current, -20);
|
||||||
|
|
||||||
|
/* Pin node */
|
||||||
|
o2nm_depend_this_node();
|
||||||
|
|
||||||
while (!kthread_should_stop() && !reg->hr_unclean_stop) {
|
while (!kthread_should_stop() && !reg->hr_unclean_stop) {
|
||||||
/* We track the time spent inside
|
/* We track the time spent inside
|
||||||
* o2hb_do_disk_heartbeat so that we avoid more than
|
* o2hb_do_disk_heartbeat so that we avoid more than
|
||||||
|
@ -1132,6 +1135,9 @@ static int o2hb_thread(void *data)
|
||||||
mlog_errno(ret);
|
mlog_errno(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Unpin node */
|
||||||
|
o2nm_undepend_this_node();
|
||||||
|
|
||||||
mlog(ML_HEARTBEAT|ML_KTHREAD, "hb thread exiting\n");
|
mlog(ML_HEARTBEAT|ML_KTHREAD, "hb thread exiting\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue