From: David Zafman Date: Thu, 26 Mar 2015 22:49:16 +0000 (-0700) Subject: osd: Create a filter_log for PGLog X-Git-Tag: v0.94~5^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1fcd3fbdef09b41bc058343cb85bad2ffcb2bc5e;p=ceph.git osd: Create a filter_log for PGLog This could be tested as a way to test pg_log_t::filter_log() Signed-off-by: David Zafman --- diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc index f7cdf6ae6bd0..8c0230977964 100644 --- a/src/osd/PGLog.cc +++ b/src/osd/PGLog.cc @@ -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, diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h index ecfd1a1a3717..dcb966b7de93 100644 --- a/src/osd/PGLog.h +++ b/src/osd/PGLog.h @@ -292,6 +292,8 @@ struct PGLog { set *trimmed); ostream& print(ostream& out) const; + + void filter_log(spg_t pgid, const OSDMap &map, const string &hit_set_namespace); };