]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: respect epoch barrier in _op_submit() 14331/head
authorIlya Dryomov <idryomov@gmail.com>
Tue, 28 Mar 2017 09:49:08 +0000 (11:49 +0200)
committerShinobu Kinjo <shinobu@redhat.com>
Tue, 4 Apr 2017 23:50:02 +0000 (08:50 +0900)
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>
(cherry picked from commit f8e8efc0a53d7bd807cc0c2178aef7c4bed62ab7)

src/osdc/Objecter.cc

index 9d16d24c5777637efffa65778d7493ca990ca903..a0bc8b9297d7307bc5027cada2a23055cf3fe690 100644 (file)
@@ -2337,8 +2337,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;