]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: fixup sortbitwise flag warning 12682/head
authorhuanwen ren <ren.huanwen@zte.com.cn>
Tue, 27 Dec 2016 10:54:45 +0000 (10:54 +0000)
committerhuanwen ren <ren.huanwen@zte.com.cn>
Tue, 27 Dec 2016 11:07:54 +0000 (11:07 +0000)
"ceph -s" does not report warning when using
command "ceph osd unset sortbitwise" to drop
sortbitwise flag.
we should use "osdmap.get_up_osd_features() &
CEPH_FEATURE_OSD_BITWISE_HOBJ_SORT"
instead of "(osdmap.get_features(CEPH_ENTITY_TYPE_OSD, NULL) &
CEPH_FEATURE_OSD_BITWISE_HOBJ_SORT)",
because osdmap.get_features only get local "features"

Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
src/mon/OSDMonitor.cc

index 39e0eb2327b180b8264ac503d7b2bb01d1a487ff..23b9a906c1c156b8b12aaf4e4a08c930d6d246b3 100644 (file)
@@ -3086,7 +3086,7 @@ void OSDMonitor::get_health(list<pair<health_status_t,string> >& summary,
 
     // Not using 'sortbitwise' and should be?
     if (!osdmap.test_flag(CEPH_OSDMAP_SORTBITWISE) &&
-       (osdmap.get_features(CEPH_ENTITY_TYPE_OSD, NULL) &
+        (osdmap.get_up_osd_features() &
         CEPH_FEATURE_OSD_BITWISE_HOBJ_SORT)) {
       ostringstream ss;
       ss << "no legacy OSD present but 'sortbitwise' flag is not set";