From b62f9f076a5dd2d19c85c800204c3e4b4acb0858 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 7 Mar 2014 14:44:42 -0800 Subject: [PATCH] mon/OSDMonitor: feature feature check bit arithmetic Make sure all features are present (instead of just any of them). Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 7a7b6ffe2d782..7acac9ed0e006 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -2808,7 +2808,7 @@ int OSDMonitor::check_cluster_features(uint64_t features, for (set::iterator it = up_osds.begin(); it != up_osds.end(); ++it) { const osd_xinfo_t &xi = osdmap.get_xinfo(*it); - if (!(xi.features & features)) { + if ((xi.features & features) != features) { if (unsupported_count > 0) unsupported_ss << ", "; unsupported_ss << "osd." << *it; @@ -2827,7 +2827,7 @@ int OSDMonitor::check_cluster_features(uint64_t features, pending_inc.new_xinfo.begin(); p != pending_inc.new_xinfo.end(); ++p) { const osd_xinfo_t &xi = p->second; - if (!(xi.features & features)) { + if ((xi.features & features) != features) { dout(10) << __func__ << " pending osd." << p->first << " features are insufficient; retry" << dendl; return -EAGAIN; -- 2.47.3