osd/PrimaryLogPG: find_object_context: drop !head_exists path

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-09-01 13:37:48 -04:00
parent a9145997db
commit 5e13884acc

View File

@ -9716,27 +9716,19 @@ int PrimaryLogPG::find_object_context(const hobject_t& oid,
// head?
if (oid.snap > ssc->snapset.seq) {
if (ssc->snapset.head_exists) {
ObjectContextRef obc = get_object_context(head, false);
dout(10) << "find_object_context " << head
<< " want " << oid.snap << " > snapset seq " << ssc->snapset.seq
<< " -- HIT " << obc->obs
<< dendl;
if (!obc->ssc)
obc->ssc = ssc;
else {
assert(ssc == obc->ssc);
put_snapset_context(ssc);
}
*pobc = obc;
return 0;
}
ObjectContextRef obc = get_object_context(head, false);
dout(10) << "find_object_context " << head
<< " want " << oid.snap << " > snapset seq " << ssc->snapset.seq
<< " but head dne -- DNE"
<< " -- HIT " << obc->obs
<< dendl;
put_snapset_context(ssc);
return -ENOENT;
if (!obc->ssc)
obc->ssc = ssc;
else {
assert(ssc == obc->ssc);
put_snapset_context(ssc);
}
*pobc = obc;
return 0;
}
// which clone would it be?