op->mark_delayed("waiting for all missing");
}
-bool ReplicatedPG::is_degraded_object(const hobject_t& soid)
+bool ReplicatedPG::is_degraded_or_backfilling_object(const hobject_t& soid)
{
if (pg_log.get_missing().missing.count(soid))
return true;
void ReplicatedPG::wait_for_degraded_object(const hobject_t& soid, OpRequestRef op)
{
- assert(is_degraded_object(soid));
+ assert(is_degraded_or_backfilling_object(soid));
// we don't have it (yet).
if (recovering.count(soid)) {
}
// degraded object?
- if (write_ordered && is_degraded_object(head)) {
+ if (write_ordered && is_degraded_or_backfilling_object(head)) {
wait_for_degraded_object(head, op);
return;
}
}
// degraded object?
- if (write_ordered && is_degraded_object(snapdir)) {
+ if (write_ordered && is_degraded_or_backfilling_object(snapdir)) {
wait_for_degraded_object(snapdir, op);
return;
}
// degraded object? (the check above was for head; this could be a clone)
if (write_ordered &&
obc->obs.oi.soid.snap != CEPH_NOSNAP &&
- is_degraded_object(obc->obs.oi.soid)) {
+ is_degraded_or_backfilling_object(obc->obs.oi.soid)) {
dout(10) << __func__ << ": clone " << obc->obs.oi.soid
<< " is degraded, waiting" << dendl;
wait_for_degraded_object(obc->obs.oi.soid, op);
dout(1) << " src_oid " << sobc->obs.oi.soid << " != "
<< obc->obs.oi.soid << dendl;
osd->reply_op_error(op, -EINVAL);
- } else if (is_degraded_object(sobc->obs.oi.soid) ||
+ } else if (is_degraded_or_backfilling_object(sobc->obs.oi.soid) ||
(check_src_targ(sobc->obs.oi.soid, obc->obs.oi.soid))) {
- if (is_degraded_object(sobc->obs.oi.soid)) {
+ if (is_degraded_or_backfilling_object(sobc->obs.oi.soid)) {
wait_for_degraded_object(sobc->obs.oi.soid, op);
} else {
waiting_for_degraded_object[sobc->obs.oi.soid].push_back(op);
assert(0 == "unexpected error code in _rollback_to");
} else { //we got our context, let's use it to do the rollback!
hobject_t& rollback_to_sobject = rollback_to->obs.oi.soid;
- if (is_degraded_object(rollback_to_sobject)) {
+ if (is_degraded_or_backfilling_object(rollback_to_sobject)) {
dout(20) << "_rollback_to attempted to roll back to a degraded object "
<< rollback_to_sobject << " (requested snapid: ) " << snapid << dendl;
wait_for_degraded_object(rollback_to_sobject, ctx->op);
ObjectContextRef obc = watch->get_obc(); // handle_watch_timeout owns this ref
dout(10) << "handle_watch_timeout obc " << obc << dendl;
- if (is_degraded_object(obc->obs.oi.soid)) {
+ if (is_degraded_or_backfilling_object(obc->obs.oi.soid)) {
callbacks_for_degraded_object[obc->obs.oi.soid].push_back(
watch->get_delayed_cb()
);
hobject_t aoid = get_hit_set_archive_object(p->begin, p->end);
// Once we hit a degraded object just skip further trim
- if (is_degraded_object(aoid))
+ if (is_degraded_or_backfilling_object(aoid))
return;
}
oid = get_hit_set_archive_object(start, now);
// If the current object is degraded we skip this persist request
- if (is_degraded_object(oid))
+ if (is_degraded_or_backfilling_object(oid))
return;
// If backfill is in progress and we could possibly overlap with the
assert(p != updated_hit_set_hist.history.end());
hobject_t oid = get_hit_set_archive_object(p->begin, p->end);
- assert(!is_degraded_object(oid));
+ assert(!is_degraded_or_backfilling_object(oid));
dout(20) << __func__ << " removing " << oid << dendl;
++repop->ctx->at_version.version;
osd->logger->inc(l_osd_agent_skip);
continue;
}
- if (is_degraded_object(*p)) {
+ if (is_degraded_or_backfilling_object(*p)) {
dout(20) << __func__ << " skip (degraded) " << *p << dendl;
osd->logger->inc(l_osd_agent_skip);
continue;