]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: no cache agent or snap trimming during premerge
authorSage Weil <sage@redhat.com>
Fri, 20 Apr 2018 03:12:19 +0000 (22:12 -0500)
committerSage Weil <sage@redhat.com>
Fri, 7 Sep 2018 17:08:40 +0000 (12:08 -0500)
The PG is quiesced; not background activity.

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

index c81562fc405d556384d608ab25e9c72c0890e829..a30f08a9a28a5dbf4c1fb6e5744705471791a1f8 100644 (file)
@@ -4514,7 +4514,9 @@ void PrimaryLogPG::kick_snap_trim()
 {
   ceph_assert(is_active());
   ceph_assert(is_primary());
-  if (is_clean() && !snap_trimq.empty()) {
+  if (is_clean() &&
+      !state_test(PG_STATE_PREMERGE) &&
+      !snap_trimq.empty()) {
     if (get_osdmap()->test_flag(CEPH_OSDMAP_NOSNAPTRIM)) {
       dout(10) << __func__ << ": nosnaptrim set, not kicking" << dendl;
     } else {
@@ -13745,6 +13747,7 @@ void PrimaryLogPG::agent_setup()
   ceph_assert(is_locked());
   if (!is_active() ||
       !is_primary() ||
+      state_test(PG_STATE_PREMERGE) ||
       pool.info.cache_mode == pg_pool_t::CACHEMODE_NONE ||
       pool.info.tier_of < 0 ||
       !get_osdmap()->have_pg_pool(pool.info.tier_of)) {