]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Create a filter_log for PGLog
authorDavid Zafman <dzafman@redhat.com>
Thu, 26 Mar 2015 22:49:16 +0000 (15:49 -0700)
committerDavid Zafman <dzafman@redhat.com>
Sat, 28 Mar 2015 01:23:08 +0000 (18:23 -0700)
This could be tested as a way to test pg_log_t::filter_log()

Signed-off-by: David Zafman <dzafman@redhat.com>
src/osd/PGLog.cc
src/osd/PGLog.h

index f7cdf6ae6bd0250cd4b76d99f7fa5f3498cee43b..8c023097796498d236f7f44e0923116508bccb0b 100644 (file)
@@ -45,6 +45,17 @@ void PGLog::IndexedLog::advance_rollback_info_trimmed_to(
   }
 }
 
+void PGLog::IndexedLog::filter_log(spg_t pgid, const OSDMap &map, const string &hit_set_namespace)
+{
+  IndexedLog out;
+  pg_log_t reject;
+
+  pg_log_t::filter_log(pgid, map, hit_set_namespace, *this, out, reject);
+
+  *this = out;
+  index();
+}
+
 void PGLog::IndexedLog::split_into(
   pg_t child_pgid,
   unsigned split_bits,
index ecfd1a1a3717107c1f03dcc6ae63b895cbe1cc36..dcb966b7de93c8a9432154a933b3f04055b8c18e 100644 (file)
@@ -292,6 +292,8 @@ struct PGLog {
       set<eversion_t> *trimmed);
 
     ostream& print(ostream& out) const;
+
+    void filter_log(spg_t pgid, const OSDMap &map, const string &hit_set_namespace);
   };