]> 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)
committerSage Weil <sage@redhat.com>
Tue, 7 Mar 2017 18:33:44 +0000 (13:33 -0500)
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>
src/osdc/Objecter.cc
src/osdc/Objecter.h

index 92f2c32ed42099b0c1ed2a14654f8eda7c4154d0..d155715061731fe8ccefdb544feb689153c7ab95 100644 (file)
@@ -1073,8 +1073,7 @@ void Objecter::_scan_requests(OSDSession *s,
                         op->session ? op->session->con.get() : nullptr);
     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:
@@ -2367,9 +2366,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 3942349adcff3880209aace990cf2df625de6df2..eab8c0c2ef12a882a74ea384e2e8860ab419be4d 100644 (file)
@@ -1336,6 +1336,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()) {