From c25ee187e28724846d0011cd8145e16956d3636e Mon Sep 17 00:00:00 2001 From: huanwen ren Date: Tue, 27 Dec 2016 10:54:45 +0000 Subject: [PATCH] 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 --- src/mon/OSDMonitor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 39e0eb2327b..23b9a906c1c 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -3086,7 +3086,7 @@ void OSDMonitor::get_health(list >& 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";