OPTION(osd_leveldb_paranoid, OPT_BOOL, false) // OSD's leveldb paranoid flag
OPTION(osd_leveldb_log, OPT_STR, "") // enable OSD leveldb log file
+// determines whether PGLog::check() compares written out log to stored log
+OPTION(osd_debug_pg_log_writeout, OPT_BOOL, false)
+
/**
* osd_client_op_priority and osd_recovery_op_priority adjust the relative
* priority of client io vs recovery io.
deleting(false), dirty_info(false), dirty_big_info(false),
info(p),
info_struct_v(0),
- coll(p), log_oid(loid), biginfo_oid(ioid),
+ coll(p), pg_log(g_ceph_context), log_oid(loid), biginfo_oid(ioid),
recovery_item(this), scrub_item(this), scrub_finalize_item(this), snap_trim_item(this), stat_queue_item(this),
recovery_ops_active(0),
waiting_on_backfill(0),
#include "include/assert.h"
#include "osd_types.h"
#include "os/ObjectStore.h"
+#include "common/ceph_context.h"
#include <list>
using namespace std;
eversion_t dirty_to;
eversion_t dirty_from;
bool dirty_divergent_priors;
+ CephContext *cct;
bool is_dirty() const {
return !touched_log ||
}
void check() {
assert(log.log.size() == log_keys_debug.size());
+ if (cct &&
+ !(cct->_conf->osd_debug_pg_log_writeout)) {
+ return;
+ }
for (list<pg_log_entry_t>::iterator i = log.log.begin();
i != log.log.end();
++i) {
check();
}
public:
- PGLog() :
+ PGLog(CephContext *cct = 0) :
touched_log(false), dirty_from(eversion_t::max()),
- dirty_divergent_priors(false) {}
+ dirty_divergent_priors(false), cct(cct) {}
void reset_backfill();