}
bool PGLog::read_log(ObjectStore *store, coll_t coll, hobject_t log_oid,
- const pg_info_t &info, OndiskLog &ondisklog, IndexedLog &log,
+ const pg_info_t &info, map<eversion_t, hobject_t> &divergent_priors,
+ IndexedLog &log,
pg_missing_t &missing, ostringstream &oss)
{
dout(10) << "read_log" << dendl;
int r = store->stat(coll_t::META_COLL, log_oid, &st);
assert(r == 0);
if (st.st_size > 0) {
- read_log_old(store, coll, log_oid, info, ondisklog, log, missing, oss);
+ read_log_old(store, coll, log_oid, info, divergent_priors, log, missing, oss);
rewrite_log = true;
} else {
log.tail = info.log_tail;
}
void PGLog::read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid,
- const pg_info_t &info, OndiskLog &ondisklog, IndexedLog &log,
+ const pg_info_t &info, map<eversion_t, hobject_t> &divergent_priors,
+ IndexedLog &log,
pg_missing_t &missing, ostringstream &oss)
{
// load bounds, based on old OndiskLog encoding.
else
ondisklog_zero_to = 0;
if (struct_v >= 5)
- ::decode(ondisklog.divergent_priors, bl);
+ ::decode(divergent_priors, bl);
DECODE_FINISH(bl);
}
uint64_t ondisklog_length = ondisklog_head - ondisklog_tail;
bool read_log(ObjectStore *store, coll_t coll, hobject_t log_oid,
const pg_info_t &info, ostringstream &oss) {
- return read_log(store, coll, log_oid, info, ondisklog, log, missing, oss);
+ return read_log(store, coll, log_oid, info, ondisklog.divergent_priors,
+ log, missing, oss);
}
/// return true if the log should be rewritten
static bool read_log(ObjectStore *store, coll_t coll, hobject_t log_oid,
- const pg_info_t &info, OndiskLog &ondisklog, IndexedLog &log,
+ const pg_info_t &info, map<eversion_t, hobject_t> &divergent_priors,
+ IndexedLog &log,
pg_missing_t &missing, ostringstream &oss);
protected:
static void read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid,
- const pg_info_t &info, OndiskLog &ondisklog, IndexedLog &log,
+ const pg_info_t &info, map<eversion_t, hobject_t> &divergent_priors,
+ IndexedLog &log,
pg_missing_t &missing, ostringstream &oss);
};