From 1721d11dbbb7f5d2cb815955697667aee75b9307 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 24 Apr 2021 15:07:25 +0800 Subject: [PATCH] osd/OSDMapMapping: mark OSDMapMapping::update() private this method could be misused easily. and it is only used by test, so mark it private. Signed-off-by: Kefu Chai --- src/osd/OSDMapMapping.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osd/OSDMapMapping.h b/src/osd/OSDMapMapping.h index 70258ff4e8d69..b4ddd322b19aa 100644 --- a/src/osd/OSDMapMapping.h +++ b/src/osd/OSDMapMapping.h @@ -286,6 +286,9 @@ private: mapping->_finish(*osdmap); } }; + friend class OSDMapTest; + // for testing only + void update(const OSDMap& map); public: void get(pg_t pgid, @@ -326,7 +329,6 @@ public: return acting_rmap[osd]; } - void update(const OSDMap& map); void update(const OSDMap& map, pg_t pgid); std::unique_ptr start_update( -- 2.39.5