From: Samuel Just Date: Wed, 11 Jan 2012 21:20:17 +0000 (-0800) Subject: PG: gen_prefix should grab a map reference atomically X-Git-Tag: v0.40~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b93bf285c9f05ab943e8e506ea2125af0f1f97ad;p=ceph.git PG: gen_prefix should grab a map reference atomically Signed-off-by: Samuel Just --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index b3eb2d41ed3..2b62c872e0b 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -62,8 +62,9 @@ void PG::lock_with_map_lock_held() std::string PG::gen_prefix() const { stringstream out; + OSDMapRef mapref = osdmap_ref; out << "osd." << osd->whoami - << " " << (osdmap_ref ? osdmap_ref->get_epoch():0) + << " " << (mapref ? mapref->get_epoch():0) << " " << *this << " "; return out.str(); }