This actually everything in the osd mempool, so it's basically a rename.
Signed-off-by: Sage Weil <sage@redhat.com>
f(buffer_meta) \
f(osd) \
f(osd_mapbl) \
+ f(osd_pglog) \
f(osdmap) \
f(osdmap_mapping) \
f(pgmap) \
spg_t pgid;
shard_id_t from;
ceph_tid_t rep_tid;
- mempool::osd::list<pg_log_entry_t> entries;
+ mempool::osd_pglog::list<pg_log_entry_t> entries;
epoch_t get_epoch() const { return map_epoch; }
spg_t get_pgid() const { return pgid; }
: MOSDFastDispatchOp(MSG_OSD_PG_UPDATE_LOG_MISSING, HEAD_VERSION,
COMPAT_VERSION) { }
MOSDPGUpdateLogMissing(
- const mempool::osd::list<pg_log_entry_t> &entries,
+ const mempool::osd_pglog::list<pg_log_entry_t> &entries,
spg_t pgid,
shard_id_t from,
epoch_t epoch,
}
bool PG::append_log_entries_update_missing(
- const mempool::osd::list<pg_log_entry_t> &entries,
+ const mempool::osd_pglog::list<pg_log_entry_t> &entries,
ObjectStore::Transaction &t)
{
assert(!entries.empty());
void PG::merge_new_log_entries(
- const mempool::osd::list<pg_log_entry_t> &entries,
+ const mempool::osd_pglog::list<pg_log_entry_t> &entries,
ObjectStore::Transaction &t)
{
dout(10) << __func__ << " " << entries << dendl;
bool append_log_entries_update_missing(
- const mempool::osd::list<pg_log_entry_t> &entries,
+ const mempool::osd_pglog::list<pg_log_entry_t> &entries,
ObjectStore::Transaction &t);
/**
* actingbackfill logs and missings (also missing_loc)
*/
void merge_new_log_entries(
- const mempool::osd::list<pg_log_entry_t> &entries,
+ const mempool::osd_pglog::list<pg_log_entry_t> &entries,
ObjectStore::Transaction &t);
void reset_interval_flush();
}
log.roll_forward_to(log.head, rollbacker);
- mempool::osd::list<pg_log_entry_t> new_entries;
+ mempool::osd_pglog::list<pg_log_entry_t> new_entries;
new_entries.splice(new_entries.end(), olog.log, from, to);
append_log_entries_update_missing(
info.last_backfill,
* It's a reverse_iterator because rend() is a natural representation for
* tail, and rbegin() works nicely for head.
*/
- mempool::osd::list<pg_log_entry_t>::reverse_iterator
+ mempool::osd_pglog::list<pg_log_entry_t>::reverse_iterator
rollback_info_trimmed_to_riter;
template <typename F>
advance_can_rollback_to(head, [&](const pg_log_entry_t &entry) {});
}
- mempool::osd::list<pg_log_entry_t> rewind_from_head(eversion_t newhead) {
+ mempool::osd_pglog::list<pg_log_entry_t> rewind_from_head(eversion_t newhead) {
auto divergent = pg_log_t::rewind_from_head(newhead);
index();
reset_rollback_info_trimmed_to_riter();
protected:
static void split_by_object(
- mempool::osd::list<pg_log_entry_t> &entries,
- map<hobject_t, mempool::osd::list<pg_log_entry_t>> *out_entries) {
+ mempool::osd_pglog::list<pg_log_entry_t> &entries,
+ map<hobject_t, mempool::osd_pglog::list<pg_log_entry_t>> *out_entries) {
while (!entries.empty()) {
- mempool::osd::list<pg_log_entry_t> &out_list = (*out_entries)[entries.front().soid];
+ auto &out_list = (*out_entries)[entries.front().soid];
out_list.splice(out_list.end(), entries, entries.begin());
}
}
static void _merge_object_divergent_entries(
const IndexedLog &log, ///< [in] log to merge against
const hobject_t &hoid, ///< [in] object we are merging
- const mempool::osd::list<pg_log_entry_t> &entries, ///< [in] entries for hoid to merge
+ const mempool::osd_pglog::list<pg_log_entry_t> &entries, ///< [in] entries for hoid to merge
const pg_info_t &info, ///< [in] info for merging entries
eversion_t olog_can_rollback_to, ///< [in] rollback boundary
missing_type &missing, ///< [in,out] missing to adjust, use
template <typename missing_type>
static void _merge_divergent_entries(
const IndexedLog &log, ///< [in] log to merge against
- mempool::osd::list<pg_log_entry_t> &entries, ///< [in] entries to merge
+ mempool::osd_pglog::list<pg_log_entry_t> &entries, ///< [in] entries to merge
const pg_info_t &oinfo, ///< [in] info for merging entries
eversion_t olog_can_rollback_to, ///< [in] rollback boundary
missing_type &omissing, ///< [in,out] missing to adjust, use
LogEntryHandler *rollbacker, ///< [in] optional rollbacker object
const DoutPrefixProvider *dpp ///< [in] logging provider
) {
- map<hobject_t, mempool::osd::list<pg_log_entry_t> > split;
+ map<hobject_t, mempool::osd_pglog::list<pg_log_entry_t> > split;
split_by_object(entries, &split);
- for (map<hobject_t, mempool::osd::list<pg_log_entry_t>>::iterator i = split.begin();
+ for (map<hobject_t, mempool::osd_pglog::list<pg_log_entry_t>>::iterator i = split.begin();
i != split.end();
++i) {
_merge_object_divergent_entries(
const pg_log_entry_t& oe,
const pg_info_t& info,
LogEntryHandler *rollbacker) {
- mempool::osd::list<pg_log_entry_t> entries;
+ mempool::osd_pglog::list<pg_log_entry_t> entries;
entries.push_back(oe);
_merge_object_divergent_entries(
log,
static bool append_log_entries_update_missing(
const hobject_t &last_backfill,
bool last_backfill_bitwise,
- const mempool::osd::list<pg_log_entry_t> &entries,
+ const mempool::osd_pglog::list<pg_log_entry_t> &entries,
bool maintain_rollback,
IndexedLog *log,
missing_type &missing,
bool append_new_log_entries(
const hobject_t &last_backfill,
bool last_backfill_bitwise,
- const mempool::osd::list<pg_log_entry_t> &entries,
+ const mempool::osd_pglog::list<pg_log_entry_t> &entries,
LogEntryHandler *rollbacker) {
bool invalidate_stats = append_log_entries_update_missing(
last_backfill,
assert(op->may_write());
const osd_reqid_t &reqid = static_cast<const MOSDOp*>(op->get_req())->get_reqid();
ObjectContextRef obc;
- mempool::osd::list<pg_log_entry_t> entries;
+ mempool::osd_pglog::list<pg_log_entry_t> entries;
entries.push_back(pg_log_entry_t(pg_log_entry_t::ERROR, soid,
get_next_version(), eversion_t(), 0,
reqid, utime_t(), r));
void PrimaryLogPG::submit_log_entries(
- const mempool::osd::list<pg_log_entry_t> &entries,
+ const mempool::osd_pglog::list<pg_log_entry_t> &entries,
ObcLockManager &&manager,
boost::optional<std::function<void(void)> > &&_on_complete,
OpRequestRef op,
pg_log.get_log().print(*_dout);
*_dout << dendl;
- mempool::osd::list<pg_log_entry_t> log_entries;
+ mempool::osd_pglog::list<pg_log_entry_t> log_entries;
utime_t mtime = ceph_clock_now();
map<hobject_t, pg_missing_item>::const_iterator m =
* Also used to store error log entries for dup detection.
*/
void submit_log_entries(
- const mempool::osd::list<pg_log_entry_t> &entries,
+ const mempool::osd_pglog::list<pg_log_entry_t> &entries,
ObcLockManager &&manager,
boost::optional<std::function<void(void)> > &&on_complete,
OpRequestRef op = OpRequestRef(),
eversion_t rollback_info_trimmed_to;
public:
- mempool::osd::list<pg_log_entry_t> log; // the actual log.
+ mempool::osd_pglog::list<pg_log_entry_t> log; // the actual log.
pg_log_t() = default;
pg_log_t(const eversion_t &last_update,
const eversion_t &log_tail,
const eversion_t &can_rollback_to,
const eversion_t &rollback_info_trimmed_to,
- mempool::osd::list<pg_log_entry_t> &&entries)
+ mempool::osd_pglog::list<pg_log_entry_t> &&entries)
: head(last_update), tail(log_tail), can_rollback_to(can_rollback_to),
rollback_info_trimmed_to(rollback_info_trimmed_to),
log(std::move(entries)) {}
pg_log_t split_out_child(pg_t child_pgid, unsigned split_bits) {
- mempool::osd::list<pg_log_entry_t> oldlog, childlog;
+ mempool::osd_pglog::list<pg_log_entry_t> oldlog, childlog;
oldlog.swap(log);
eversion_t old_tail;
std::move(childlog));
}
- mempool::osd::list<pg_log_entry_t> rewind_from_head(eversion_t newhead) {
+ mempool::osd_pglog::list<pg_log_entry_t> rewind_from_head(eversion_t newhead) {
assert(newhead >= tail);
- mempool::osd::list<pg_log_entry_t>::iterator p = log.end();
- mempool::osd::list<pg_log_entry_t> divergent;
+ mempool::osd_pglog::list<pg_log_entry_t>::iterator p = log.end();
+ mempool::osd_pglog::list<pg_log_entry_t> divergent;
while (true) {
if (p == log.begin()) {
// yikes, the whole thing is divergent!