]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: wait based on min_epoch
authorSage Weil <sage@redhat.com>
Tue, 28 Feb 2017 02:14:40 +0000 (20:14 -0600)
committerSage Weil <sage@redhat.com>
Mon, 1 May 2017 20:35:11 +0000 (15:35 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/PG.cc
src/osd/PrimaryLogPG.cc

index 92dacd75af69a371a3f4b9a5f278a8c8c197bf0f..b3a09c2b640ba44cfb5e4d9b02bd82e014194795 100644 (file)
@@ -6361,7 +6361,7 @@ void OSD::dispatch_session_waiting(Session *session, OSDMapRef osdmap)
     assert(ms_can_fast_dispatch(op->get_req()));
     const MOSDFastDispatchOp *m = static_cast<const MOSDFastDispatchOp*>(
       op->get_req());
-    if (m->get_map_epoch() > osdmap->get_epoch()) {
+    if (m->get_min_epoch() > osdmap->get_epoch()) {
       break;
     }
     session->waiting_on_map.erase(i++);
index 49bd4863475afafeba0144897d63861c2b3a029c..4ebeeadc967e783fd4c559742ae7cd6485efd347 100644 (file)
@@ -3452,7 +3452,7 @@ void PG::requeue_map_waiters()
   epoch_t epoch = get_osdmap()->get_epoch();
   auto p = waiting_for_map.begin();
   while (p != waiting_for_map.end()) {
-    if (op_must_wait_for_map(epoch, p->second.front())) {
+    if (epoch < p->second.front()->min_epoch) {
       dout(20) << __func__ << " " << p->first << " front op "
               << p->second.front() << " must still wait, doing nothing"
               << dendl;
index c3a790ac6cd70051fc92ae64198fcf29d9ef189d..8bf2dca2bf8eb4c1f93a2fa99395c372d8b546dd 100644 (file)
@@ -1564,9 +1564,9 @@ void PrimaryLogPG::do_request(
     op->mark_delayed("waiting_for_map not empty");
     return;
   }
-  if (op_must_wait_for_map(get_osdmap()->get_epoch(), op)) {
-    dout(20) << __func__ << " queue on waiting_for_map "
-            << op->get_source() << dendl;
+  if (!have_same_or_newer_map(op->min_epoch)) {
+    dout(20) << __func__ << " min " << op->min_epoch
+            << ", queue on waiting_for_map " << op->get_source() << dendl;
     waiting_for_map[op->get_source()].push_back(op);
     op->mark_delayed("op must wait for map");
     return;