Comment rules and take lock during init/shutdown (nice but not necessary).
Signed-off-by: Sage Weil <sage@redhat.com>
// initialize osdmap references in sharded wq
for (auto& shard : shards) {
+ Mutex::Locker l(shard->osdmap_lock);
shard->shard_osdmap = osdmap;
}
osdmap = OSDMapRef();
for (auto s : shards) {
+ Mutex::Locker l(s->osdmap_lock);
s->shard_osdmap = OSDMapRef();
}
service.shutdown();
Cond sdata_cond;
string osdmap_lock_name;
- Mutex osdmap_lock;
+ Mutex osdmap_lock; ///< protect shard_osdmap updates vs users w/o shard_lock
OSDMapRef shard_osdmap;
OSDMapRef get_osdmap() {