From: runsisi Date: Sat, 24 Nov 2018 09:22:52 +0000 (+0800) Subject: osdc/Objecter: update op_target_t::paused in _calc_target X-Git-Tag: v12.2.11~18^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ae15fbef7a99c4dffdce9f7cac238de378e24925;p=ceph.git osdc/Objecter: update op_target_t::paused in _calc_target LingerOp::target.paused has no chance to be touched by anyone (see Objecter::_send_linger), then the following bug exists: 1. ceph osd pause 2. rados watch -p pool oid 3. ceph osd unpause 3. the linger op will be in a lost state, i.e., osd op cancelled and the linger op will not be resent Fixes: http://tracker.ceph.com/issues/37398 Signed-off-by: runsisi (cherry picked from commit e7a23d86e0b90cfd91e7126f958c0501d537e280) --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index df8bc236a3d..33a418ec038 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -2872,10 +2872,12 @@ int Objecter::_calc_target(op_target_t *t, Connection *con, bool any_change) force_resend = true; } - bool unpaused = false; - if (t->paused && !target_should_be_paused(t)) { + bool unpaused = !target_should_be_paused(t); + if (t->paused && unpaused) { t->paused = false; - unpaused = true; + } else { + t->paused = !unpaused; + unpaused = false; } bool legacy_change =