Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon/OSDMonitor: set last_force_op_resend on overlay pool too #12712

Merged
merged 1 commit into from Jan 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/mon/OSDMonitor.cc
Expand Up @@ -7460,6 +7460,8 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
np->read_tier = overlaypool_id;
np->write_tier = overlaypool_id;
np->last_force_op_resend = pending_inc.epoch;
pg_pool_t *noverlay_p = pending_inc.get_new_pool(overlaypool_id, overlay_p);
noverlay_p->last_force_op_resend = pending_inc.epoch;
ss << "overlay for '" << poolstr << "' is now (or already was) '" << overlaypoolstr << "'";
if (overlay_p->cache_mode == pg_pool_t::CACHEMODE_NONE)
ss <<" (WARNING: overlay pool cache_mode is still NONE)";
Expand Down Expand Up @@ -7490,6 +7492,16 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,

// go
pg_pool_t *np = pending_inc.get_new_pool(pool_id, p);
if (np->has_read_tier()) {
const pg_pool_t *op = osdmap.get_pg_pool(np->read_tier);
pg_pool_t *nop = pending_inc.get_new_pool(np->read_tier,op);
nop->last_force_op_resend = pending_inc.epoch;
}
if (np->has_write_tier()) {
const pg_pool_t *op = osdmap.get_pg_pool(np->write_tier);
pg_pool_t *nop = pending_inc.get_new_pool(np->write_tier, op);
nop->last_force_op_resend = pending_inc.epoch;
}
np->clear_read_tier();
np->clear_write_tier();
np->last_force_op_resend = pending_inc.epoch;
Expand Down Expand Up @@ -7726,6 +7738,8 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
np->tiers.insert(tierpool_id);
np->read_tier = np->write_tier = tierpool_id;
np->set_snap_epoch(pending_inc.epoch); // tier will update to our snap info
np->last_force_op_resend = pending_inc.epoch;
ntp->last_force_op_resend = pending_inc.epoch;
ntp->tier_of = pool_id;
ntp->cache_mode = mode;
ntp->hit_set_count = g_conf->osd_tier_default_cache_hit_set_count;
Expand Down