]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: optionally process all maps in advance_pg
authorSage Weil <sage@redhat.com>
Sun, 5 Nov 2017 16:50:54 +0000 (10:50 -0600)
committerSage Weil <sage@redhat.com>
Wed, 29 Nov 2017 22:07:59 +0000 (16:07 -0600)
The new op wq mode wont do maps in batches and reqeuue.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h

index 989f582ad70a5f63e0085487984c8e95d1dda92e..fcdaacb2ec2ab79b693ba7f46473ec1f638bd336 100644 (file)
@@ -7790,7 +7790,8 @@ bool OSD::advance_pg(
   epoch_t osd_epoch, PG *pg,
   ThreadPool::TPHandle &handle,
   PG::RecoveryCtx *rctx,
-  set<PGRef> *new_pgs)
+  set<PGRef> *new_pgs,
+  bool no_max)
 {
   assert(pg->is_locked());
   epoch_t next_epoch = pg->get_osdmap()->get_epoch() + 1;
@@ -7809,7 +7810,7 @@ bool OSD::advance_pg(
   }
 
   for (;
-       next_epoch <= osd_epoch && next_epoch <= max;
+       next_epoch <= osd_epoch && (no_max || next_epoch <= max);
        ++next_epoch) {
     OSDMapRef nextmap = service.try_get_map(next_epoch);
     if (!nextmap) {
@@ -9264,7 +9265,7 @@ void OSD::process_peering_events(
       pg->unlock();
       continue;
     }
-    if (!advance_pg(curmap->get_epoch(), pg, handle, &rctx, &split_pgs)) {
+    if (!advance_pg(curmap->get_epoch(), pg, handle, &rctx, &split_pgs, false)) {
       // we need to requeue the PG explicitly since we didn't actually
       // handle an event
       peering_wq.queue(pg);
index 2baa821d56e39592b31905e46765437aad57ea3c..52e27c622358224fc983a8f097226cdab85282d0 100644 (file)
@@ -1890,7 +1890,8 @@ private:
     epoch_t advance_to, PG *pg,
     ThreadPool::TPHandle &handle,
     PG::RecoveryCtx *rctx,
-    set<PGRef> *split_pgs
+    set<PGRef> *split_pgs,
+    bool no_max
   );
   void consume_map();
   void activate_map();