]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: unlock osd_lock when tweaking osd settings 25726/head
authorKefu Chai <kchai@redhat.com>
Sun, 30 Dec 2018 13:57:04 +0000 (21:57 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 30 Dec 2018 15:19:02 +0000 (23:19 +0800)
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/37751
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/OSD.cc

index 2276a909f7427a81307c0f4fb81c867da1f74b78..d3f8c4fc70760e9ba6bc8943e73247470f565adb 100644 (file)
@@ -6508,6 +6508,7 @@ int OSD::_do_command(
     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 "