]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: remove the PGLog::prefix_provider as it's always nullptr.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Sat, 3 Feb 2018 16:12:48 +0000 (17:12 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 27 Feb 2018 10:38:47 +0000 (11:38 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/osd/PGLog.h
src/test/osd/TestPGLog.cc

index 372fd9e30449475365d6f6db31e4f1c261cc07d0..73c58499b6991df1892a333bedb626548c43856e 100644 (file)
@@ -34,13 +34,11 @@ constexpr auto PGLOG_INDEXED_ALL              = PGLOG_INDEXED_OBJECTS
 class CephContext;
 
 struct PGLog : DoutPrefixProvider {
-  DoutPrefixProvider *prefix_provider;
   string gen_prefix() const override {
-    return prefix_provider ? prefix_provider->gen_prefix() : "";
+    return "";
   }
   unsigned get_subsys() const override {
-    return prefix_provider ? prefix_provider->get_subsys() :
-      (unsigned)ceph_subsys_osd;
+    return static_cast<unsigned>(ceph_subsys_osd);
   }
   CephContext *get_cct() const override {
     return cct;
@@ -646,8 +644,7 @@ protected:
 public:
 
   // cppcheck-suppress noExplicitConstructor
-  PGLog(CephContext *cct, DoutPrefixProvider *dpp = nullptr) :
-    prefix_provider(dpp),
+  PGLog(CephContext *cct) :
     dirty_from(eversion_t::max()),
     writeout_from(eversion_t::max()),
     dirty_from_dups(eversion_t::max()),
index f26af817da553b12dcb40aad1db65db327091bd7..704bbb52a0fcc7e3061e496da8355a7324bf146d 100644 (file)
@@ -2294,7 +2294,7 @@ TEST_F(PGLogTest, split_into_preserves_may_include_deletes) {
   {
     rebuilt_missing_with_deletes = false;
     missing.may_include_deletes = true;
-    PGLog child_log(cct, prefix_provider);
+    PGLog child_log(cct);
     pg_t child_pg;
     split_into(child_pg, 6, &child_log);
     ASSERT_TRUE(child_log.get_missing().may_include_deletes);
@@ -2304,7 +2304,7 @@ TEST_F(PGLogTest, split_into_preserves_may_include_deletes) {
   {
     rebuilt_missing_with_deletes = false;
     missing.may_include_deletes = false;
-    PGLog child_log(cct, prefix_provider);
+    PGLog child_log(cct);
     pg_t child_pg;
     split_into(child_pg, 6, &child_log);
     ASSERT_FALSE(child_log.get_missing().may_include_deletes);