From: Sage Weil Date: Sun, 5 Nov 2017 16:50:54 +0000 (-0600) Subject: osd: optionally process all maps in advance_pg X-Git-Tag: v13.0.2~840^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e94badae654f23aa9beb2a9973458940ef59a534;p=ceph.git osd: optionally process all maps in advance_pg The new op wq mode wont do maps in batches and reqeuue. Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 989f582ad70a..fcdaacb2ec2a 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -7790,7 +7790,8 @@ bool OSD::advance_pg( epoch_t osd_epoch, PG *pg, ThreadPool::TPHandle &handle, PG::RecoveryCtx *rctx, - set *new_pgs) + set *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); diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 2baa821d56e3..52e27c622358 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1890,7 +1890,8 @@ private: epoch_t advance_to, PG *pg, ThreadPool::TPHandle &handle, PG::RecoveryCtx *rctx, - set *split_pgs + set *split_pgs, + bool no_max ); void consume_map(); void activate_map();