提交 8d79d088 编写于 作者: K Kurt Hackel 提交者: Mark Fasheh

ocfs2: add a small delay after a failed migration

Otherwise we risk starving other threads.
Signed-off-by: NKurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
上级 685f1adb
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <linux/inet.h> #include <linux/inet.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/kthread.h> #include <linux/kthread.h>
#include <linux/delay.h>
#include "cluster/heartbeat.h" #include "cluster/heartbeat.h"
...@@ -165,6 +166,7 @@ void dlm_purge_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *lockres) ...@@ -165,6 +166,7 @@ void dlm_purge_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *lockres)
} else if (ret < 0) { } else if (ret < 0) {
mlog(ML_NOTICE, "lockres %.*s: migrate failed, retrying\n", mlog(ML_NOTICE, "lockres %.*s: migrate failed, retrying\n",
lockres->lockname.len, lockres->lockname.name); lockres->lockname.len, lockres->lockname.name);
msleep(100);
goto again; goto again;
} }
...@@ -640,8 +642,9 @@ static int dlm_thread(void *data) ...@@ -640,8 +642,9 @@ static int dlm_thread(void *data)
* spinlock and do NOT have the dlm lock. * spinlock and do NOT have the dlm lock.
* safe to reserve/queue asts and run the lists. */ * safe to reserve/queue asts and run the lists. */
mlog(0, "calling dlm_shuffle_lists with dlm=%p, " mlog(0, "calling dlm_shuffle_lists with dlm=%s, "
"res=%p\n", dlm, res); "res=%.*s\n", dlm->name,
res->lockname.len, res->lockname.name);
/* called while holding lockres lock */ /* called while holding lockres lock */
dlm_shuffle_lists(dlm, res); dlm_shuffle_lists(dlm, res);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册