mon/OSDMonitor: fixup sortbitwise flag warning

"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>
This commit is contained in:
huanwen ren 2016-12-27 10:54:45 +00:00
parent b5acc288d7
commit c25ee187e2

View 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";