bufferlist bl;
mon->store->get(OSD_PG_CREATING_PREFIX, "creating", bl);
auto p = bl.begin();
- std::lock_guard<Spinlock> l(creating_pgs_lock);
+ std::lock_guard<std::mutex> l(creating_pgs_lock);
creating_pgs.decode(p);
dout(7) << __func__ << " loading creating_pgs e" << creating_pgs.last_scan_epoch << dendl;
}
{
creating_pgs_t pending_creatings;
{
- std::lock_guard<Spinlock> l(creating_pgs_lock);
+ std::lock_guard<std::mutex> l(creating_pgs_lock);
pending_creatings = creating_pgs;
}
if (pending_creatings.last_scan_epoch > inc.epoch) {
{
if (mon->monmap->get_required_features().contains_all(
ceph::features::mon::FEATURE_LUMINOUS)) {
- std::lock_guard<Spinlock> l(creating_pgs_lock);
+ std::lock_guard<std::mutex> l(creating_pgs_lock);
if (!creating_pgs.pgs.empty()) {
return 0;
}
void OSDMonitor::update_creating_pgs()
{
creating_pgs_by_osd_epoch.clear();
- std::lock_guard<Spinlock> l(creating_pgs_lock);
+ std::lock_guard<std::mutex> l(creating_pgs_lock);
for (const auto& pg : creating_pgs.pgs) {
int acting_primary = -1;
auto pgid = pg.first;
// the epoch when the pg mapping was calculated
epoch_t creating_pgs_epoch = 0;
creating_pgs_t creating_pgs;
- Spinlock creating_pgs_lock;
+ std::mutex creating_pgs_lock;
creating_pgs_t update_pending_creatings(const OSDMap::Incremental& inc);
void trim_creating_pgs(creating_pgs_t *creating_pgs, const PGMap& pgm);