]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: gen_prefix should grab a map reference atomically
authorSamuel Just <samuel.just@dreamhost.com>
Wed, 11 Jan 2012 21:20:17 +0000 (13:20 -0800)
committerSamuel Just <samuel.just@dreamhost.com>
Wed, 11 Jan 2012 21:50:24 +0000 (13:50 -0800)
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
src/osd/PG.cc

index b3eb2d41ed33301775237f09f8da4b74148aada7..2b62c872e0b76f2928da15db39f6b5daf652d519 100644 (file)
@@ -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();
 }