]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: send release to remote reservations in progress
authorSage Weil <sage@redhat.com>
Fri, 27 Oct 2017 22:37:47 +0000 (17:37 -0500)
committerSage Weil <sage@redhat.com>
Fri, 27 Oct 2017 22:37:47 +0000 (17:37 -0500)
If we have a REQUEST outstanding and then cancel, send a RELEASE to the
REQUEST target too, so that they too can clean up.  This avoids leaving
the replica in the RepRecovering state when the primary is restarting
the whole reservation process.

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

index f5fea98dbd93c6eabd1be3dcb481103c764185d1..09dd4b2a2184ad02d71c6266af1e2f2a6a168209 100644 (file)
@@ -6548,11 +6548,11 @@ void PG::RecoveryState::WaitRemoteBackfillReserved::retry()
   pg->osd->local_reserver.cancel_reservation(pg->info.pgid);
 
   // Send CANCEL to all previously acquired reservations
-  set<pg_shard_t>::const_iterator it, begin, end, next;
+  set<pg_shard_t>::const_iterator it, begin, end;
   begin = context< Active >().remote_shards_to_reserve_backfill.begin();
   end = context< Active >().remote_shards_to_reserve_backfill.end();
   assert(begin != end);
-  for (next = it = begin, ++next ; next != backfill_osd_it; ++it, ++next) {
+  for (it = begin; it != backfill_osd_it; ++it) {
     //The primary never backfills itself
     assert(*it != pg->pg_whoami);
     ConnectionRef con = pg->osd->get_con_osd_cluster(