From 128cb17d87ff9ac42434bd508ccc96bc42d53484 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 19 Feb 2013 16:09:25 -0800 Subject: [PATCH] osd/OSDMap: note OSDHASHPSPOOL feature when pool FLAG_HASHPSPOOL is set This allows the osd and mon to enforce feature bits on their connections. Signed-off-by: Sage Weil --- src/osd/OSDMap.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index a2db1a117d92c..8f0b01db7060b 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -726,6 +726,13 @@ uint64_t OSDMap::get_features(uint64_t *pmask) const features |= CEPH_FEATURE_CRUSH_TUNABLES2; mask |= CEPH_FEATURES_CRUSH; + for (map::const_iterator p = pools.begin(); p != pools.end(); ++p) { + if (p->second.flags & pg_pool_t::FLAG_HASHPSPOOL) { + features |= CEPH_FEATURE_OSDHASHPSPOOL; + } + } + mask |= CEPH_FEATURE_OSDHASHPSPOOL; + if (pmask) *pmask = mask; return features; -- 2.39.5