From 3ef8c4210fbac6621d5c86ae54ab12e38bc31b8f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 31 Jan 2020 11:51:23 -0600 Subject: [PATCH] osdc/Objecter: move respects_full() to op_target_t Signed-off-by: Sage Weil --- src/osdc/Objecter.cc | 4 ++-- src/osdc/Objecter.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 37539eabd9a..6c2e88185b1 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -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 " diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index ca0833dfd68..9bc1cee9278 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -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()) { -- 2.39.5