]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: fixup sortbitwise flag warning
authorhuanwen ren <ren.huanwen@zte.com.cn>
Tue, 27 Dec 2016 10:54:45 +0000 (10:54 +0000)
committerSage Weil <sage@redhat.com>
Tue, 27 Dec 2016 15:31:11 +0000 (10:31 -0500)
"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>
(cherry picked from commit c25ee187e28724846d0011cd8145e16956d3636e)

src/mon/OSDMonitor.cc

index 861cb6b6060e7474db2c5d4787f094335aa6803f..22732e2ef265ea25148dc50e31473256df56d01f 100644 (file)
@@ -3084,7 +3084,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";