mirror of
https://github.com/ceph/ceph
synced 2025-01-29 22:43:40 +00:00
PGLog: s/write_log/write_log_and_missing/g
Signed-off-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
parent
f014f0c1e0
commit
9e1cc04822
@ -2930,7 +2930,7 @@ void PG::write_if_dirty(ObjectStore::Transaction& t)
|
||||
map<string,bufferlist> km;
|
||||
if (dirty_big_info || dirty_info)
|
||||
prepare_write_info(&km);
|
||||
pg_log.write_log(t, &km, coll, pgmeta_oid, pool.info.require_rollback());
|
||||
pg_log.write_log_and_missing(t, &km, coll, pgmeta_oid, pool.info.require_rollback());
|
||||
if (!km.empty())
|
||||
t.omap_setkeys(coll, pgmeta_oid, km);
|
||||
}
|
||||
|
@ -561,14 +561,14 @@ void PGLog::check() {
|
||||
}
|
||||
}
|
||||
|
||||
void PGLog::write_log(
|
||||
void PGLog::write_log_and_missing(
|
||||
ObjectStore::Transaction& t,
|
||||
map<string,bufferlist> *km,
|
||||
const coll_t& coll, const ghobject_t &log_oid,
|
||||
bool require_rollback)
|
||||
{
|
||||
if (is_dirty()) {
|
||||
dout(5) << "write_log with: "
|
||||
dout(5) << "write_log_and_missing with: "
|
||||
<< "dirty_to: " << dirty_to
|
||||
<< ", dirty_from: " << dirty_from
|
||||
<< ", dirty_divergent_priors: "
|
||||
@ -577,7 +577,7 @@ void PGLog::write_log(
|
||||
<< ", writeout_from: " << writeout_from
|
||||
<< ", trimmed: " << trimmed
|
||||
<< dendl;
|
||||
_write_log(
|
||||
_write_log_and_missing(
|
||||
t, km, log, coll, log_oid, divergent_priors,
|
||||
dirty_to,
|
||||
dirty_from,
|
||||
@ -593,7 +593,7 @@ void PGLog::write_log(
|
||||
}
|
||||
}
|
||||
|
||||
void PGLog::write_log(
|
||||
void PGLog::write_log_and_missing(
|
||||
ObjectStore::Transaction& t,
|
||||
map<string,bufferlist> *km,
|
||||
pg_log_t &log,
|
||||
@ -601,14 +601,14 @@ void PGLog::write_log(
|
||||
map<eversion_t, hobject_t> &divergent_priors,
|
||||
bool require_rollback)
|
||||
{
|
||||
_write_log(
|
||||
_write_log_and_missing(
|
||||
t, km, log, coll, log_oid,
|
||||
divergent_priors, eversion_t::max(), eversion_t(), eversion_t(),
|
||||
set<eversion_t>(),
|
||||
true, true, require_rollback, 0);
|
||||
}
|
||||
|
||||
void PGLog::_write_log(
|
||||
void PGLog::_write_log_and_missing(
|
||||
ObjectStore::Transaction& t,
|
||||
map<string,bufferlist> *km,
|
||||
pg_log_t &log,
|
||||
@ -635,7 +635,7 @@ void PGLog::_write_log(
|
||||
}
|
||||
}
|
||||
|
||||
//dout(10) << "write_log, clearing up to " << dirty_to << dendl;
|
||||
//dout(10) << "write_log_and_missing, clearing up to " << dirty_to << dendl;
|
||||
if (touch_log)
|
||||
t.touch(coll, log_oid);
|
||||
if (dirty_to != eversion_t()) {
|
||||
@ -645,7 +645,7 @@ void PGLog::_write_log(
|
||||
clear_up_to(log_keys_debug, dirty_to.get_key_name());
|
||||
}
|
||||
if (dirty_to != eversion_t::max() && dirty_from != eversion_t::max()) {
|
||||
// dout(10) << "write_log, clearing from " << dirty_from << dendl;
|
||||
// dout(10) << "write_log_and_missing, clearing from " << dirty_from << dendl;
|
||||
t.omap_rmkeyrange(
|
||||
coll, log_oid,
|
||||
dirty_from.get_key_name(), eversion_t::max().get_key_name());
|
||||
@ -682,7 +682,7 @@ void PGLog::_write_log(
|
||||
}
|
||||
|
||||
if (dirty_divergent_priors) {
|
||||
//dout(10) << "write_log: writing divergent_priors" << dendl;
|
||||
//dout(10) << "write_log_and_missing: writing divergent_priors" << dendl;
|
||||
::encode(divergent_priors, (*km)["divergent_priors"]);
|
||||
}
|
||||
if (require_rollback) {
|
||||
|
@ -1001,13 +1001,13 @@ public:
|
||||
return invalidate_stats;
|
||||
}
|
||||
|
||||
void write_log(ObjectStore::Transaction& t,
|
||||
void write_log_and_missing(ObjectStore::Transaction& t,
|
||||
map<string,bufferlist> *km,
|
||||
const coll_t& coll,
|
||||
const ghobject_t &log_oid,
|
||||
bool require_rollback);
|
||||
|
||||
static void write_log(
|
||||
static void write_log_and_missing(
|
||||
ObjectStore::Transaction& t,
|
||||
map<string,bufferlist>* km,
|
||||
pg_log_t &log,
|
||||
@ -1015,7 +1015,7 @@ public:
|
||||
const ghobject_t &log_oid, map<eversion_t, hobject_t> &divergent_priors,
|
||||
bool require_rollback);
|
||||
|
||||
static void _write_log(
|
||||
static void _write_log_and_missing(
|
||||
ObjectStore::Transaction& t,
|
||||
map<string,bufferlist>* km,
|
||||
pg_log_t &log,
|
||||
|
@ -502,7 +502,7 @@ int write_pg(ObjectStore::Transaction &t, epoch_t epoch, pg_info_t &info,
|
||||
return ret;
|
||||
coll_t coll(info.pgid);
|
||||
map<string,bufferlist> km;
|
||||
PGLog::write_log(t, &km, log, coll, info.pgid.make_pgmeta_oid(), divergent_priors, true);
|
||||
PGLog::write_log_and_missing(t, &km, log, coll, info.pgid.make_pgmeta_oid(), divergent_priors, true);
|
||||
t.omap_setkeys(coll, info.pgid.make_pgmeta_oid(), km);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user