The oldest version we care about is 10, and these were for <8.
Signed-off-by: Sage Weil <sage@redhat.com>
pg_log.read_log_and_missing(
store,
coll,
- info_struct_v < 8 ? coll_t::meta() : coll,
- ghobject_t(info_struct_v < 8 ? OSD::make_pg_log_oid(pg_id) : pgmeta_oid),
+ pgmeta_oid,
info,
oss,
cct->_conf->osd_ignore_stale_divergent_priors,
void read_log_and_missing(
ObjectStore *store,
coll_t pg_coll,
- coll_t log_coll,
- ghobject_t log_oid,
+ ghobject_t pgmeta_oid,
const pg_info_t &info,
ostringstream &oss,
bool tolerate_divergent_missing_log,
bool debug_verify_stored_missing = false
) {
return read_log_and_missing(
- store, pg_coll, log_coll, log_oid, info,
+ store, pg_coll, pgmeta_oid, info,
log, missing, oss,
tolerate_divergent_missing_log,
&clear_divergent_priors,
static void read_log_and_missing(
ObjectStore *store,
coll_t pg_coll,
- coll_t log_coll,
- ghobject_t log_oid,
+ ghobject_t pgmeta_oid,
const pg_info_t &info,
IndexedLog &log,
missing_type &missing,
bool debug_verify_stored_missing = false
) {
ldpp_dout(dpp, 20) << "read_log_and_missing coll " << pg_coll
- << " log_oid " << log_oid << dendl;
+ << " " << pgmeta_oid << dendl;
// legacy?
struct stat st;
- int r = store->stat(log_coll, log_oid, &st);
+ int r = store->stat(pg_coll, pgmeta_oid, &st);
assert(r == 0);
assert(st.st_size == 0);
// will get overridden below if it had been recorded
eversion_t on_disk_can_rollback_to = info.last_update;
eversion_t on_disk_rollback_info_trimmed_to = eversion_t();
- ObjectMap::ObjectMapIterator p = store->get_omap_iterator(log_coll, log_oid);
+ ObjectMap::ObjectMapIterator p = store->get_omap_iterator(pg_coll,
+ pgmeta_oid);
map<eversion_t, hobject_t> divergent_priors;
bool must_rebuild = false;
missing.may_include_deletes = false;
auto orig_dups = log.dups;
clear();
ostringstream err;
- read_log_and_missing(store.get(), test_coll, test_coll, log_oid,
+ read_log_and_missing(store.get(), test_coll, log_oid,
pg_info_t(), err, false);
ASSERT_EQ(orig_dups.size(), log.dups.size());
ASSERT_EQ(orig_dups, log.dups);
}
};
-ghobject_t infos_oid = OSD::make_infos_oid();
-ghobject_t log_oid;
-
int file_fd = fd_none;
bool debug;
bool force = false;
try {
ostringstream oss;
assert(struct_ver > 0);
- PGLog::read_log_and_missing(fs, coll,
- struct_ver >= 8 ? coll : coll_t::meta(),
- struct_ver >= 8 ? pgid.make_pgmeta_oid() : log_oid,
- info, log, missing,
- oss,
- g_ceph_context->_conf->osd_ignore_stale_divergent_priors);
+ PGLog::read_log_and_missing(
+ fs, coll,
+ pgid.make_pgmeta_oid(),
+ info, log, missing,
+ oss,
+ g_ceph_context->_conf->osd_ignore_stale_divergent_priors);
if (debug && oss.str().size())
cerr << oss.str() << std::endl;
}
}
ghobject_t pgmeta_oid = pgid.make_pgmeta_oid();
- log_oid = OSD::make_pg_log_oid(pgid);
//Check for PG already present.
coll_t coll(pgid);
goto out;
}
- log_oid = OSD::make_pg_log_oid(pgid);
-
if (op == "remove") {
if (!force && !dry_run) {
cerr << "Please use export-remove or you must use --force option" << std::endl;