]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: feature feature check bit arithmetic 1403/head
authorSage Weil <sage@inktank.com>
Fri, 7 Mar 2014 22:44:42 +0000 (14:44 -0800)
committerSage Weil <sage@inktank.com>
Fri, 7 Mar 2014 22:44:42 +0000 (14:44 -0800)
Make sure all features are present (instead of just any of them).

Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/OSDMonitor.cc

index 7a7b6ffe2d78238d2d7b991c51c13019bc225eb6..7acac9ed0e006cf8cb35802590a3b0901805b4ca 100644 (file)
@@ -2808,7 +2808,7 @@ int OSDMonitor::check_cluster_features(uint64_t features,
   for (set<int32_t>::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;