]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: clear missing_loc only during async_recovery
authorNeha Ojha <nojha@redhat.com>
Wed, 21 Feb 2018 16:40:48 +0000 (08:40 -0800)
committerNeha Ojha <nojha@redhat.com>
Thu, 15 Mar 2018 18:13:34 +0000 (11:13 -0700)
Signed-off-by: Neha Ojha <nojha@redhat.com>
src/osd/PrimaryLogPG.cc

index 7f9bd5cdb08fa3edeff450d46308ec10929a8bb9..a568320e396d82e0e19c1f35a7f24864181c8e6c 100644 (file)
@@ -10107,16 +10107,16 @@ void PrimaryLogPG::issue_repop(RepGather *repop, OpContext *ctx)
   }
 
   dout(10) << __func__ << " missing_loc before: " << missing_loc.get_locations(soid) << dendl;
-  // clear out missing_loc
-  set<pg_shard_t> peers(missing_loc.get_locations(soid));
-  for (set<pg_shard_t>::iterator r = peers.begin();
-       r != peers.end();
-       ++r) {
-    pg_shard_t peer(*r);
-    missing_loc.remove_location(soid, peer);
-  }
 
   if (requires_missing_loc) {
+    // clear out missing_loc
+    set<pg_shard_t> peers(missing_loc.get_locations(soid));
+    for (set<pg_shard_t>::iterator r = peers.begin();
+         r != peers.end();
+         ++r) {
+      pg_shard_t peer(*r);
+      missing_loc.remove_location(soid, peer);
+    }
     for (set<pg_shard_t>::const_iterator i = actingset.begin();
          i != actingset.end();
          ++i) {