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;
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()),
{
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);
{
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);