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 <dzafman@redhat.com>
This commit is contained in:
David Zafman 2015-03-26 15:49:16 -07:00
parent c751191f65
commit 1fcd3fbdef
2 changed files with 13 additions and 0 deletions

View 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,

View 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);
};