From 13e3a454a21824b5bcfbfa0c9215fe5e7b285b24 Mon Sep 17 00:00:00 2001 From: sageweil Date: Thu, 19 Jul 2007 16:43:59 +0000 Subject: [PATCH] osd pg locking fix git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1530 29311d96-e01e-0410-9327-a35deaab8ce9 --- trunk/ceph/osd/OSD.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/ceph/osd/OSD.cc b/trunk/ceph/osd/OSD.cc index f7aa65a29b93b..309fa35c0a864 100644 --- a/trunk/ceph/osd/OSD.cc +++ b/trunk/ceph/osd/OSD.cc @@ -1579,7 +1579,7 @@ void OSD::handle_pg_notify(MOSDPGNotify *m) pg_t pgid = it->pgid; PG *pg; - if (pg_map.count(pgid) == 0) { + if (!_have_pg(pgid)) { // same primary? PG::Info::History history = it->history; project_pg_history(pgid, history, m->get_epoch()); @@ -1610,7 +1610,7 @@ void OSD::handle_pg_notify(MOSDPGNotify *m) } } else { // already had it. am i (still) the primary? - pg->lock(); + pg = _lookup_lock_pg(pgid); if (m->get_epoch() < pg->info.history.same_primary_since) { dout(10) << *pg << " handle_pg_notify primary changed in " << pg->info.history.same_primary_since -- 2.39.5