//typedef boost::intrusive_ptr<PG> PGRef;
for (list<PGRef>::iterator i = to_remove.begin();
i != to_remove.end();
to_remove.erase(i++)) {
RWLock::WLocker locker(pg_map_lock);
(*i)->lock();
_remove_pg(&**i);//OSD::_remove_pg(PG *pg)
(*i)->unlock();
}
转载于:https://my.oschina.net/itfanr/blog/1802608