]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: discard ops based on either new or old lfor and features
authorSage Weil <sage@redhat.com>
Wed, 1 Feb 2017 23:37:25 +0000 (18:37 -0500)
committerSage Weil <sage@redhat.com>
Mon, 13 Feb 2017 16:44:53 +0000 (11:44 -0500)
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 <sage@redhat.com>
src/osd/PG.cc

index c31cc7bd32625ea40845c527117e8f194f7742e0..c0d88fdcba600da1614e684eb3e54942f2c32840 100644 (file)
@@ -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;