From: Sage Weil Date: Fri, 7 Mar 2014 22:44:42 +0000 (-0800) Subject: mon/OSDMonitor: feature feature check bit arithmetic X-Git-Tag: v0.78~65^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b62f9f076a5dd2d19c85c800204c3e4b4acb0858;p=ceph.git mon/OSDMonitor: feature feature check bit arithmetic Make sure all features are present (instead of just any of them). Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 7a7b6ffe2d78..7acac9ed0e00 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;