From: Sage Weil Date: Wed, 1 Feb 2017 23:37:25 +0000 (-0500) Subject: osd/PG: discard ops based on either new or old lfor and features X-Git-Tag: v12.0.1~383^2~32 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8caa8f162e78745ccfaf3c84ed692ae06ce08fd3;p=ceph.git 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 --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index c31cc7bd326..c0d88fdcba6 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;