]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: respect epoch barrier in _op_submit() 14190/head
authorIlya Dryomov <idryomov@gmail.com>
Tue, 28 Mar 2017 09:49:08 +0000 (11:49 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 28 Mar 2017 13:54:10 +0000 (15:54 +0200)
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 <idryomov@gmail.com>
src/osdc/Objecter.cc

index d45e4c45fb0ab139582c08e8908213e764b90f14..b3251ac07ff23d84e4b8ad739d363dc478573700 100644 (file)
@@ -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;