pg_map[pgid] = pg;
- if (hold_map_lock)
- pg->lock_with_map_lock_held(no_lockdep_check);
- else
- pg->lock(no_lockdep_check);
+ pg->lock(no_lockdep_check);
pg->get("PGMap"); // because it's in pg_map
return pg;
}
assert(osd_lock.is_locked());
assert(pg_map.count(pgid));
PG *pg = pg_map[pgid];
- pg->lock_with_map_lock_held();
+ pg->lock();
return pg;
}
{
dout(10) << "do_split to " << childpgids << " on " << *parent << dendl;
- parent->lock_with_map_lock_held();
+ parent->lock();
// create and lock children
map<pg_t,PG*> children;
dout(30) << "lock" << dendl;
}
-void PG::lock_with_map_lock_held(bool no_lockdep)
-{
- _lock.Lock(no_lockdep);
- // if we have unrecorded dirty state with the lock dropped, there is a bug
- assert(!dirty_info);
- assert(!dirty_big_info);
- assert(!dirty_log);
-
- dout(30) << "lock_with_map_lock_held" << dendl;
-}
-
void PG::reassert_lock_with_map_lock_held()
{
assert(_lock.is_locked());
_lock.Unlock();
}
- /* During handle_osd_map, the osd holds a write lock to the osdmap.
- * *_with_map_lock_held assume that the map_lock is already held */
- void lock_with_map_lock_held(bool no_lockdep = false);
-
// assert we still have lock held, and update our map ref
void reassert_lock_with_map_lock_held();