]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osdc/Objecter: remove duplicated pause check code
authorSage Weil <sage@redhat.com>
Fri, 31 Jan 2020 17:59:26 +0000 (11:59 -0600)
committerSage Weil <sage@redhat.com>
Fri, 31 Jan 2020 17:59:26 +0000 (11:59 -0600)
_calc_target() already pauses and unpauses based on the
target_should_be_paused() helper, and we just called _calc_target at the
top of this method.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osdc/Objecter.cc

index 05e9febcc20b182fb769acd20b7a7bbcade5794d..7c791eaf6558efbded299861c58de3cefbd5f045 100644 (file)
@@ -2421,30 +2421,9 @@ void Objecter::_op_submit(Op *op, shunique_lock& sul, ceph_tid_t *ptid)
   }
 
   bool need_send = false;
-
-  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
+  if (op->target.paused) {
+    ldout(cct, 10) << " tid " << op->tid << " op " << op << " is paused"
                   << dendl;
-    op->target.paused = true;
-    _maybe_request_map();
-  } else if ((op->target.flags & CEPH_OSD_FLAG_READ) &&
-            osdmap->test_flag(CEPH_OSDMAP_PAUSERD)) {
-    ldout(cct, 10) << " paused read " << op << " tid " << op->tid
-                  << dendl;
-    op->target.paused = true;
-    _maybe_request_map();
-  } else if (op->target.respects_full() &&
-            (_osdmap_full_flag() ||
-             _osdmap_pool_full(op->target.base_oloc.pool))) {
-    ldout(cct, 0) << " FULL, paused modify " << op << " tid "
-                 << op->tid << dendl;
-    op->target.paused = true;
     _maybe_request_map();
   } else if (!s->is_homeless()) {
     need_send = true;