]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/OSDMonitor: fix improper input/testing range of crush somke testing 17231/head 17232/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 23 Aug 2017 03:31:35 +0000 (11:31 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 24 Aug 2017 15:27:02 +0000 (23:27 +0800)
commit0d249a0fc6a7d846e04bc786c47f4811ccee9764
treef810449494c6c26fa969765c6ba6717a058a4bd3
parent4fbf379bd37b2ce9ca29778e9a51899ca2f2cbde
mon/OSDMonitor: fix improper input/testing range of crush somke testing

CrushTester::test() will reset testing range to [0, 1023] whenever
min_x or max_x is negative and the constructor of CrushTester will
always default min_x and max_x to -1.

Thus to set the test range correctly, you have to specify both min_x and max_x.
Local test shows this patch shall decrease the time consumed by the crush
smoke testing to approximate 1/20 of those without this.

For exmaple:
crush somke test duration: 0.668354 seconds ->
crush somke test duration: 0.012592 seconds

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit e128a1e913fb4a224e392cd09203fc7cf4fa9f5f)
src/mon/OSDMonitor.cc