From 53b9b384e499a404bba1e1e51ad8fe053fac76cf Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Tue, 19 Jun 2018 22:02:32 +0800 Subject: [PATCH] common/WorkQueue: Before set_ioprio it must do create/try_create. Signed-off-by: Jianpeng Ma --- src/common/WorkQueue.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/WorkQueue.cc b/src/common/WorkQueue.cc index 5c8c772ab496f..f9d3455c2d0b2 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()); } } -- 2.39.5