mirror of
https://github.com/ceph/ceph
synced 2025-01-29 22:43:40 +00:00
PG: use clear_location() to clear out missing_loc
Signed-off-by: Neha Ojha <nojha@redhat.com>
This commit is contained in:
parent
80c57b1ccd
commit
e68f2f0ff0
@ -782,6 +782,15 @@ protected:
|
||||
_inc_count(p->second);
|
||||
}
|
||||
}
|
||||
|
||||
void clear_location(const hobject_t &hoid) {
|
||||
auto p = missing_loc.find(hoid);
|
||||
if (p != missing_loc.end()) {
|
||||
_dec_count(p->second);
|
||||
missing_loc.erase(p);
|
||||
}
|
||||
}
|
||||
|
||||
void add_active_missing(const pg_missing_t &missing) {
|
||||
for (map<hobject_t, pg_missing_item>::const_iterator i =
|
||||
missing.get_items().begin();
|
||||
|
@ -10125,13 +10125,7 @@ void PrimaryLogPG::issue_repop(RepGather *repop, OpContext *ctx)
|
||||
|
||||
if (requires_missing_loc) {
|
||||
// clear out missing_loc
|
||||
set<pg_shard_t> peers(missing_loc.get_locations(soid));
|
||||
for (set<pg_shard_t>::iterator r = peers.begin();
|
||||
r != peers.end();
|
||||
++r) {
|
||||
pg_shard_t peer(*r);
|
||||
missing_loc.remove_location(soid, peer);
|
||||
}
|
||||
missing_loc.clear_location(soid);
|
||||
for (set<pg_shard_t>::const_iterator i = actingset.begin();
|
||||
i != actingset.end();
|
||||
++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user