From: xie xingguo Date: Mon, 7 Mar 2016 15:24:50 +0000 (+0800) Subject: mon: OSDMonitor: wait proposal finished if thrash succeeds X-Git-Tag: v11.0.0~850^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=32a88b3207f58fb92017236c960fa9fffb470d53;p=ceph.git mon: OSDMonitor: wait proposal finished if thrash succeeds By returning true, the thrash() method indicates caller that it has modified the pending_inc and we shall waiting for the changes to take effect, which is the most normal behaviour when we receive and successfully perform a command from caller. The problem here is that we discard the result of thrash() method unconditionly here, and thus we shall always fall through to "reply" instead of "update", which is the expecting action when thrash() succeeds as mentioned above. Signed-off-by: xie xingguo --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index b87b567b1520..1ef1670293b1 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -7643,6 +7643,8 @@ done: ss << "will thrash map for " << thrash_map << " epochs"; ret = thrash(); err = 0; + if (ret) + goto update; } else { err = -EINVAL; }