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

PrimaryLogPG: don't update digests for objects with mismatched names #12788

Merged
merged 1 commit into from Jan 5, 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
13 changes: 12 additions & 1 deletion src/osd/PrimaryLogPG.cc
Expand Up @@ -13120,7 +13120,18 @@ void PrimaryLogPG::scrub_snapshot_metadata(
continue;
dout(10) << __func__ << " recording digests for " << p->first << dendl;
ObjectContextRef obc = get_object_context(p->first, false);
assert(obc);
if (!obc) {
osd->clog->error() << info.pgid << " " << mode
<< " cannot get object context for "
<< p->first;
continue;
} else if (obc->obs.oi.soid != p->first) {
osd->clog->error() << info.pgid << " " << mode
<< " object " << p->first
<< " has a valid oi attr with a mismatched name, "
<< " obc->obs.oi.soid: " << obc->obs.oi.soid;
continue;
}
OpContextUPtr ctx = simple_opc_create(obc);
ctx->at_version = get_next_version();
ctx->mtime = utime_t(); // do not update mtime
Expand Down