mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
ocfs2: add uuid to ocfs2 thread name for problem analysis
A node can mount multiple ocfs2 volumes. And if thread names are same for each volume/domain, it will bring inconvenience when analyzing problems because we have to identify which volume/domain the messages belong to. Since thread name will be printed to messages, so add volume uuid or dlm name to thread name can benefit problem analysis. Signed-off-by: Joseph Qi <joseph.qi@huawei.com> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Gang He <ghe@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
b1529a41f7
commit
5afc44e2e9
5 changed files with 10 additions and 6 deletions
|
@ -1866,6 +1866,7 @@ static int dlm_join_domain(struct dlm_ctxt *dlm)
|
||||||
int status;
|
int status;
|
||||||
unsigned int backoff;
|
unsigned int backoff;
|
||||||
unsigned int total_backoff = 0;
|
unsigned int total_backoff = 0;
|
||||||
|
char wq_name[O2NM_MAX_NAME_LEN];
|
||||||
|
|
||||||
BUG_ON(!dlm);
|
BUG_ON(!dlm);
|
||||||
|
|
||||||
|
@ -1895,7 +1896,8 @@ static int dlm_join_domain(struct dlm_ctxt *dlm)
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
|
|
||||||
dlm->dlm_worker = create_singlethread_workqueue("dlm_wq");
|
snprintf(wq_name, O2NM_MAX_NAME_LEN, "dlm_wq-%s", dlm->name);
|
||||||
|
dlm->dlm_worker = create_singlethread_workqueue(wq_name);
|
||||||
if (!dlm->dlm_worker) {
|
if (!dlm->dlm_worker) {
|
||||||
status = -ENOMEM;
|
status = -ENOMEM;
|
||||||
mlog_errno(status);
|
mlog_errno(status);
|
||||||
|
|
|
@ -205,7 +205,7 @@ int dlm_launch_recovery_thread(struct dlm_ctxt *dlm)
|
||||||
mlog(0, "starting dlm recovery thread...\n");
|
mlog(0, "starting dlm recovery thread...\n");
|
||||||
|
|
||||||
dlm->dlm_reco_thread_task = kthread_run(dlm_recovery_thread, dlm,
|
dlm->dlm_reco_thread_task = kthread_run(dlm_recovery_thread, dlm,
|
||||||
"dlm_reco_thread");
|
"dlm_reco-%s", dlm->name);
|
||||||
if (IS_ERR(dlm->dlm_reco_thread_task)) {
|
if (IS_ERR(dlm->dlm_reco_thread_task)) {
|
||||||
mlog_errno(PTR_ERR(dlm->dlm_reco_thread_task));
|
mlog_errno(PTR_ERR(dlm->dlm_reco_thread_task));
|
||||||
dlm->dlm_reco_thread_task = NULL;
|
dlm->dlm_reco_thread_task = NULL;
|
||||||
|
|
|
@ -493,7 +493,8 @@ int dlm_launch_thread(struct dlm_ctxt *dlm)
|
||||||
{
|
{
|
||||||
mlog(0, "Starting dlm_thread...\n");
|
mlog(0, "Starting dlm_thread...\n");
|
||||||
|
|
||||||
dlm->dlm_thread_task = kthread_run(dlm_thread, dlm, "dlm_thread");
|
dlm->dlm_thread_task = kthread_run(dlm_thread, dlm, "dlm-%s",
|
||||||
|
dlm->name);
|
||||||
if (IS_ERR(dlm->dlm_thread_task)) {
|
if (IS_ERR(dlm->dlm_thread_task)) {
|
||||||
mlog_errno(PTR_ERR(dlm->dlm_thread_task));
|
mlog_errno(PTR_ERR(dlm->dlm_thread_task));
|
||||||
dlm->dlm_thread_task = NULL;
|
dlm->dlm_thread_task = NULL;
|
||||||
|
|
|
@ -2998,7 +2998,8 @@ int ocfs2_dlm_init(struct ocfs2_super *osb)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* launch downconvert thread */
|
/* launch downconvert thread */
|
||||||
osb->dc_task = kthread_run(ocfs2_downconvert_thread, osb, "ocfs2dc");
|
osb->dc_task = kthread_run(ocfs2_downconvert_thread, osb, "ocfs2dc-%s",
|
||||||
|
osb->uuid_str);
|
||||||
if (IS_ERR(osb->dc_task)) {
|
if (IS_ERR(osb->dc_task)) {
|
||||||
status = PTR_ERR(osb->dc_task);
|
status = PTR_ERR(osb->dc_task);
|
||||||
osb->dc_task = NULL;
|
osb->dc_task = NULL;
|
||||||
|
|
|
@ -1090,7 +1090,7 @@ int ocfs2_journal_load(struct ocfs2_journal *journal, int local, int replayed)
|
||||||
/* Launch the commit thread */
|
/* Launch the commit thread */
|
||||||
if (!local) {
|
if (!local) {
|
||||||
osb->commit_task = kthread_run(ocfs2_commit_thread, osb,
|
osb->commit_task = kthread_run(ocfs2_commit_thread, osb,
|
||||||
"ocfs2cmt");
|
"ocfs2cmt-%s", osb->uuid_str);
|
||||||
if (IS_ERR(osb->commit_task)) {
|
if (IS_ERR(osb->commit_task)) {
|
||||||
status = PTR_ERR(osb->commit_task);
|
status = PTR_ERR(osb->commit_task);
|
||||||
osb->commit_task = NULL;
|
osb->commit_task = NULL;
|
||||||
|
@ -1507,7 +1507,7 @@ void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
osb->recovery_thread_task = kthread_run(__ocfs2_recovery_thread, osb,
|
osb->recovery_thread_task = kthread_run(__ocfs2_recovery_thread, osb,
|
||||||
"ocfs2rec");
|
"ocfs2rec-%s", osb->uuid_str);
|
||||||
if (IS_ERR(osb->recovery_thread_task)) {
|
if (IS_ERR(osb->recovery_thread_task)) {
|
||||||
mlog_errno((int)PTR_ERR(osb->recovery_thread_task));
|
mlog_errno((int)PTR_ERR(osb->recovery_thread_task));
|
||||||
osb->recovery_thread_task = NULL;
|
osb->recovery_thread_task = NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue