From: Sage Weil Date: Sun, 20 Jul 2014 16:48:15 +0000 (-0700) Subject: osdc/Objecter: add OSDMap accessors that are lock-safe X-Git-Tag: v0.86~213^2~81 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d83d0f480b71cfcb78d8ae74106e3d5d362a1ae8;p=ceph.git osdc/Objecter: add OSDMap accessors that are lock-safe Everybody needs to use these to inspect the OSDMap. Signed-off-by: Sage Weil --- diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 07884c7269c..00e767de015 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -1613,6 +1613,14 @@ public: void start(); void shutdown(); + const OSDMap *get_osdmap_read() { + rwlock.get_read(); + return osdmap; + } + void put_osdmap_read() { + rwlock.put_read(); + } + /** * Tell the objecter to throttle outgoing ops according to its * budget (in _conf). If you do this, ops can block, in