]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: fix test_scrub_sched following recent scrub changes 55340/head
authorRonen Friedman <rfriedma@redhat.com>
Sun, 28 Jan 2024 16:48:18 +0000 (10:48 -0600)
committerRonen Friedman <rfriedma@redhat.com>
Wed, 31 Jan 2024 07:29:19 +0000 (01:29 -0600)
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/test/osd/test_scrub_sched.cc

index afeb32b21d9d28582155067102b26fac5a158a7a..b6c069c4b5f4e13ba46715766a898bac00bb1d96 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "common/async/context_pool.h"
 #include "common/ceph_argparse.h"
+#include "common/Finisher.h"
 #include "global/global_context.h"
 #include "global/global_init.h"
 #include "include/utime_fmt.h"
@@ -109,9 +110,17 @@ class FakeOsd : public Scrub::ScrubSchedListener {
     return std::nullopt;
   }
 
+  AsyncReserver<spg_t, Finisher>& get_scrub_reserver() final
+  {
+    return m_scrub_reserver;
+  }
+
  private:
   int m_osd_num;
   std::map<spg_t, schedule_result_t> m_next_response;
+  Finisher reserver_finisher{g_ceph_context};
+  AsyncReserver<spg_t, Finisher> m_scrub_reserver{
+      g_ceph_context, &reserver_finisher, 1};
 };