]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: unlock osd_lock when tweaking osd settings 25833/head
authorKefu Chai <kchai@redhat.com>
Sun, 30 Dec 2018 13:57:04 +0000 (21:57 +0800)
committerVenky Shankar <vshankar@redhat.com>
Tue, 8 Jan 2019 08:50:17 +0000 (03:50 -0500)
unlock osd_lock when serving "debug kick_recovery_wq" command

we need to unlock osd_lock temporarily when updating the osd settings,
otherwise we will run into assert failure. because
OSD::handle_conf_change() acquires the osd_lock which is not a recursive
lock.

Fixes: http://tracker.ceph.com/issues/37762
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 8e94b081506fa9fbdbea09113f1549772bb6ec04)

 Conflicts:
src/osd/OSD.cc

src/osd/OSD.cc

index b7ca0622eca9aa85e50260dcef09b9fa707c9f81..d37da7f8d44779f9d26eb7d319142678e710f3b4 100644 (file)
@@ -6993,6 +6993,7 @@ void OSD::do_command(Connection *con, ceph_tid_t tid, vector<string>& cmd, buffe
     cmd_getval(cct, cmdmap, "delay", delay);
     ostringstream oss;
     oss << delay;
+    unlock_guard unlock{osd_lock};
     r = cct->_conf->set_val("osd_recovery_delay_start", oss.str().c_str());
     if (r != 0) {
       ss << "kick_recovery_wq: error setting "