]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: do not return unused value
authorKefu Chai <kchai@redhat.com>
Mon, 14 Dec 2020 14:49:55 +0000 (22:49 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 14 Dec 2020 17:47:17 +0000 (01:47 +0800)
do not return a bool from
`ReplicatedRecoveryBackend::maybe_pull_missing_obj()` anymore, as the
caller does not check it at all.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/replicated_recovery_backend.cc
src/crimson/osd/replicated_recovery_backend.h

index 89d6db2f32ce79c2993005ca0d919d672ea79858..9c46d9391a2073e4504a1fc6415f5dcef3978ac9 100644 (file)
@@ -29,7 +29,7 @@ seastar::future<> ReplicatedRecoveryBackend::recover_object(
   return seastar::do_with(std::map<pg_shard_t, PushOp>(), get_shards_to_push(soid),
     [this, soid, need](auto& pops, auto& shards) {
     return maybe_pull_missing_obj(soid, need).then(
-      [this, soid, need, &pops, &shards](bool pulled) {
+      [this, soid, need, &pops, &shards] {
       return maybe_push_shards(soid, need, pops, shards);
     });
   });
@@ -105,14 +105,14 @@ ReplicatedRecoveryBackend::maybe_push_shards(
   }));
 }
 
-seastar::future<bool>
+seastar::future<>
 ReplicatedRecoveryBackend::maybe_pull_missing_obj(
   const hobject_t& soid,
   eversion_t need)
 {
   pg_missing_tracker_t local_missing = pg.get_local_missing();
   if (!local_missing.is_missing(soid)) {
-    return seastar::make_ready_future<bool>(false);
+    return seastar::make_ready_future<>();
   }
   PullOp po;
   auto& recovery_waiter = recovering.at(soid);
@@ -132,8 +132,6 @@ ReplicatedRecoveryBackend::maybe_pull_missing_obj(
     pg.get_osdmap_epoch()
   ).then([&recovery_waiter] {
     return recovery_waiter.wait_for_pull();
-  }).then([] {
-    return seastar::make_ready_future<bool>(true);
   });
 }
 
index aff0f500c858dcf924488d19292a98330243dd58..bc39eb8e48f90a9a25deefe7e975be79e47265c2 100644 (file)
@@ -110,9 +110,7 @@ protected:
   }
 private:
   /// pull missing object from peer
-  ///
-  /// @return true if the object is pulled, false otherwise
-  seastar::future<bool> maybe_pull_missing_obj(
+  seastar::future<> maybe_pull_missing_obj(
     const hobject_t& soid,
     eversion_t need);