From: Jianpeng Ma Date: Tue, 19 Jun 2018 14:02:32 +0000 (+0800) Subject: common/WorkQueue: Before set_ioprio it must do create/try_create. X-Git-Tag: v14.0.1~1035^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=53b9b384e499a404bba1e1e51ad8fe053fac76cf;p=ceph.git common/WorkQueue: Before set_ioprio it must do create/try_create. Signed-off-by: Jianpeng Ma --- diff --git a/src/common/WorkQueue.cc b/src/common/WorkQueue.cc index 5c8c772ab496..f9d3455c2d0b 100644 --- a/src/common/WorkQueue.cc +++ b/src/common/WorkQueue.cc @@ -157,11 +157,12 @@ void ThreadPool::start_threads() ldout(cct, 10) << "start_threads creating and starting " << wt << dendl; _threads.insert(wt); + wt->create(thread_name.c_str()); + int r = wt->set_ioprio(ioprio_class, ioprio_priority); if (r < 0) lderr(cct) << " set_ioprio got " << cpp_strerror(r) << dendl; - wt->create(thread_name.c_str()); } }