]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: resend RWORDERED ops on full 14427/head
authorSage Weil <sage@redhat.com>
Fri, 3 Mar 2017 03:20:08 +0000 (21:20 -0600)
committerNathan Cutler <ncutler@suse.com>
Mon, 10 Apr 2017 11:06:35 +0000 (13:06 +0200)
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 8daed367c9faaf01ec95fbae9044022d42d334d5..5617d015076dd5f89505b31fbcfadc93242c1f5c 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:
@@ -2301,9 +2300,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 8167306dd8517c02da6596d1748cd14440a15883..f0cc99269cc259ffa864796d8893bd3a5b39a9d9 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()) {