return objecter->with_osdmap(std::forward<Args>(args)...);
}
+ // call cb(osdmap, pg_map, ...args) with the appropriate locks
+ template <typename Callback, typename ...Args>
+ auto with_osdmap_and_pgmap(Callback&& cb, Args&& ...args) const ->
+ decltype(objecter->with_osdmap(std::forward<Callback>(cb),
+ pg_map,
+ std::forward<Args>(args)...))
+ {
+ ceph_assert(objecter != nullptr);
+ Mutex::Locker l(lock);
+ return objecter->with_osdmap(
+ std::forward<Callback>(cb),
+ pg_map,
+ std::forward<Args>(args)...);
+ }
+
};
#endif