The version specifies which version of the object no longer should be
missing. We should thus remove it from the missing set if we needed
anything less than OR EQUAL to that version. (If we are missing something
newer, then missing.rm() is a no-op.)
Make the argument name less weird while we're at it.
Reported-by: Henry Chang <henry.cy.chang@gmail.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
rmissing[need] = oid;
}
-void PG::Missing::rm(const sobject_t& oid, eversion_t when)
+void PG::Missing::rm(const sobject_t& oid, eversion_t v)
{
- if (missing.count(oid) && missing[oid].need < when) {
+ if (missing.count(oid) && missing[oid].need <= v) {
rmissing.erase(missing[oid].need);
missing.erase(oid);
}
void add_event(Log::Entry& e);
void revise_need(sobject_t oid, eversion_t need);
void add(const sobject_t& oid, eversion_t need, eversion_t have);
- void rm(const sobject_t& oid, eversion_t when);
+ void rm(const sobject_t& oid, eversion_t v);
void got(const sobject_t& oid, eversion_t v);
void got(const std::map<sobject_t, Missing::item>::iterator &m);