From f8e8efc0a53d7bd807cc0c2178aef7c4bed62ab7 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Tue, 28 Mar 2017 11:49:08 +0200 Subject: [PATCH] osdc/Objecter: respect epoch barrier in _op_submit() Epoch barrier instructs us to avoid sending (i.e. pause) any OSD ops until we see a barrier epoch. The only thing epoch_barrier check in target_should_be_paused() does is keep already paused ops paused. We need to actually pause incoming OSD ops in _op_submit(). Fixes: http://tracker.ceph.com/issues/19396 Signed-off-by: Ilya Dryomov --- src/osdc/Objecter.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index d45e4c45fb0a..b3251ac07ff2 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -2354,8 +2354,13 @@ void Objecter::_op_submit(Op *op, shunique_lock& sul, ceph_tid_t *ptid) bool need_send = false; - if ((op->target.flags & CEPH_OSD_FLAG_WRITE) && - osdmap->test_flag(CEPH_OSDMAP_PAUSEWR)) { + if (osdmap->get_epoch() < epoch_barrier) { + ldout(cct, 10) << " barrier, paused " << op << " tid " << op->tid + << dendl; + op->target.paused = true; + _maybe_request_map(); + } else if ((op->target.flags & CEPH_OSD_FLAG_WRITE) && + osdmap->test_flag(CEPH_OSDMAP_PAUSEWR)) { ldout(cct, 10) << " paused modify " << op << " tid " << op->tid << dendl; op->target.paused = true; -- 2.47.3