From 8caa8f162e78745ccfaf3c84ed692ae06ce08fd3 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 1 Feb 2017 18:37:25 -0500 Subject: [PATCH] osd/PG: discard ops based on either new or old lfor and features If the client has the new feature bit, use the new field; if they have the older feature bit, use the old field. Note that there is no change to the Objecter: last_force_op_resend is still the "current" field that it should pay attention to. Signed-off-by: Sage Weil --- src/osd/PG.cc | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index c31cc7bd3262..c0d88fdcba60 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -5468,11 +5468,19 @@ bool PG::can_discard_op(OpRequestRef& op) return true; } - if (m->get_map_epoch() < pool.info.last_force_op_resend && - m->get_connection()->has_feature(CEPH_FEATURE_OSD_POOLRESEND)) { - dout(7) << __func__ << " sent before last_force_op_resend " - << pool.info.last_force_op_resend << ", dropping" << *m << dendl; - return true; + if (m->get_connection()->has_feature(CEPH_FEATURE_RESEND_ON_SPLIT)) { + if (m->get_map_epoch() < pool.info.get_last_force_op_resend()) { + dout(7) << __func__ << " sent before last_force_op_resend " + << pool.info.last_force_op_resend << ", dropping" << *m << dendl; + return true; + } + } else if (m->get_connection()->has_feature(CEPH_FEATURE_OSD_POOLRESEND)) { + if (m->get_map_epoch() < pool.info.get_last_force_op_resend_preluminous()) { + dout(7) << __func__ << " sent before last_force_op_resend_preluminous " + << pool.info.last_force_op_resend_preluminous + << ", dropping" << *m << dendl; + return true; + } } return false; -- 2.47.3