From: Adam C. Emerson Date: Tue, 30 Aug 2016 15:34:25 +0000 (-0400) Subject: crush: Remove the mapper_lock X-Git-Tag: v11.1.0~328^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cafdc65622cbf46fae6aab5c46ac78727c88217c;p=ceph.git crush: Remove the mapper_lock Now that we no longer use the map as a scratch pad, we don't need to lock during rule execution. Signed-off-by: Adam C. Emerson --- diff --git a/src/crush/CrushWrapper.h b/src/crush/CrushWrapper.h index 059872c6cbb3..b8234f81db2a 100644 --- a/src/crush/CrushWrapper.h +++ b/src/crush/CrushWrapper.h @@ -50,7 +50,6 @@ inline static void decode(crush_rule_step &s, bufferlist::iterator &p) using namespace std; class CrushWrapper { - mutable Mutex mapper_lock; public: std::map type_map; /* bucket/device type names */ std::map name_map; /* bucket/device names */ @@ -78,8 +77,7 @@ public: CrushWrapper(const CrushWrapper& other); const CrushWrapper& operator=(const CrushWrapper& other); - CrushWrapper() : mapper_lock("CrushWrapper::mapper_lock"), - crush(0), have_rmaps(false) { + CrushWrapper() : crush(0), have_rmaps(false) { create(); } ~CrushWrapper() { @@ -1088,7 +1086,6 @@ public: void do_rule(int rule, int x, vector& out, int maxout, const vector<__u32>& weight) const { - Mutex::Locker l(mapper_lock); int rawout[maxout]; char work[crush_work_size(crush, maxout)]; crush_init_workspace(crush, work);