]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: move respects_full() to op_target_t
authorSage Weil <sage@redhat.com>
Fri, 31 Jan 2020 17:51:23 +0000 (11:51 -0600)
committerSage Weil <sage@redhat.com>
Fri, 31 Jan 2020 17:51:23 +0000 (11:51 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osdc/Objecter.cc
src/osdc/Objecter.h

index 37539eabd9a5b89cd8ba53ff27d7f5699231897f..6c2e88185b187323a1f99c879931e183588e5219 100644 (file)
@@ -1094,7 +1094,7 @@ void Objecter::_scan_requests(
                         op->session ? op->session->con.get() : nullptr);
     switch (r) {
     case RECALC_OP_TARGET_NO_ACTION:
-      if (!skipped_map && !(force_resend_writes && op->respects_full()))
+      if (!skipped_map && !(force_resend_writes && op->target.respects_full()))
        break;
       // -- fall-thru --
     case RECALC_OP_TARGET_NEED_RESEND:
@@ -2439,7 +2439,7 @@ void Objecter::_op_submit(Op *op, shunique_lock& sul, ceph_tid_t *ptid)
                   << dendl;
     op->target.paused = true;
     _maybe_request_map();
-  } else if (op->respects_full() &&
+  } 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 "
index ca0833dfd68677e86a77a9778911981cb5976607..9bc1cee92784419bc0c3aa71c92408d18f339dea 100644 (file)
@@ -1437,6 +1437,12 @@ public:
       return r == 0 || (r > 0 && h < end);
     }
 
+    bool respects_full() const {
+      return
+       (flags & (CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_RWORDERED)) &&
+       !(flags & (CEPH_OSD_FLAG_FULL_TRY | CEPH_OSD_FLAG_FULL_FORCE));
+    }
+
     void dump(ceph::Formatter *f) const;
   };
 
@@ -1536,12 +1542,6 @@ public:
       return tid < other.tid;
     }
 
-    bool respects_full() const {
-      return
-       (target.flags & (CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_RWORDERED)) &&
-       !(target.flags & (CEPH_OSD_FLAG_FULL_TRY | CEPH_OSD_FLAG_FULL_FORCE));
-    }
-
   private:
     ~Op() override {
       while (!out_handler.empty()) {