From: Sage Weil Date: Fri, 3 Mar 2017 03:20:08 +0000 (-0600) Subject: osdc/Objecter: resend RWORDERED ops on full X-Git-Tag: v10.2.11~189^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c1946e31f36df4881949c786af3bacdccb7b3289;p=ceph.git osdc/Objecter: resend RWORDERED ops on full 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 (cherry picked from commit c4b73f19a7be13ff412eef804efcd8c18ed4dae6) --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 01e79c63ed77b..a92a6ee0368a0 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -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 " diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 2955a071e7d89..bceefd4dab16c 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -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()) {