]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: resend RWORDERED ops on full
authorSage Weil <sage@redhat.com>
Fri, 3 Mar 2017 03:20:08 +0000 (21:20 -0600)
committerDavid Zafman <dzafman@redhat.com>
Thu, 21 Sep 2017 03:02:14 +0000 (20:02 -0700)
Our condition for respecting the FULL flag is complex, and involves
the WRITE | RWORDERED flags vs the FULL_FORCE | FULL_TRY flags.  Previously,
we could block a read bc of RWORDRED but not resend it later.

Fix by capturing the complex condition in a respects_full() bool and using
it both for the blocking-on-send and resending-on-possibly-notfull-later
checks.

Fixes: http://tracker.ceph.com/issues/19133
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit c4b73f19a7be13ff412eef804efcd8c18ed4dae6)

src/osdc/Objecter.cc
src/osdc/Objecter.h

index 01e79c63ed77b48d2eba6d57136d26c7bbec9b84..a92a6ee0368a03a7523e0585629b2c931cba4367 100644 (file)
@@ -1036,8 +1036,7 @@ void Objecter::_scan_requests(OSDSession *s,
     int r = _calc_target(&op->target, &op->last_force_resend);
     switch (r) {
     case RECALC_OP_TARGET_NO_ACTION:
-      if (!force_resend &&
-         (!force_resend_writes || !(op->target.flags & CEPH_OSD_FLAG_WRITE)))
+      if (!force_resend && !(force_resend_writes && op->respects_full()))
        break;
       // -- fall-thru --
     case RECALC_OP_TARGET_NEED_RESEND:
@@ -2306,9 +2305,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->target.flags & (CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_RWORDERED)) &&
-            !(op->target.flags & (CEPH_OSD_FLAG_FULL_TRY |
-                                  CEPH_OSD_FLAG_FULL_FORCE)) &&
+  } else if (op->respects_full() &&
             (_osdmap_full_flag() ||
              _osdmap_pool_full(op->target.base_oloc.pool))) {
     ldout(cct, 0) << " FULL, paused modify " << op << " tid "
index 2955a071e7d897fb61051764930c8ca8ec6fa037..bceefd4dab16c9a06545439a40343cfcd67ff919 100644 (file)
@@ -1330,6 +1330,12 @@ 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() {
       while (!out_handler.empty()) {