From c0af056eb9bdb62cfd8a6f9054a3a3c78c8e7447 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 4 Feb 2013 22:03:32 -0800 Subject: [PATCH] mdsmap: backported is_data_pool() This roughly corresponds to mainline commit 99d9e1d. Signed-off-by: Sage Weil --- src/mds/MDSMap.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mds/MDSMap.h b/src/mds/MDSMap.h index dc8969c3cff0d..2cbbfa33f19f2 100644 --- a/src/mds/MDSMap.h +++ b/src/mds/MDSMap.h @@ -244,6 +244,10 @@ public: int64_t get_cas_pg_pool() const { return cas_pg_pool; } int64_t get_metadata_pg_pool() const { return metadata_pg_pool; } + bool is_data_pool(int64_t poolid) const { + return std::find(data_pg_pools.begin(), data_pg_pools.end(), poolid) != data_pg_pools.end(); + } + const map& get_mds_info() { return mds_info; } const mds_info_t& get_mds_info_gid(uint64_t gid) { assert(mds_info.count(gid)); -- 2.39.5