From 63392aa197c74a03f6cef72106913da0bef64bc8 Mon Sep 17 00:00:00 2001 From: wangzhengyong Date: Mon, 13 Mar 2017 11:03:35 +0800 Subject: [PATCH] os/bluestore: fix bug for calc extent_avg in reshard function Signed-off-by: wangzhengyong@cmss.chinamobile.com --- src/os/bluestore/BlueStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index f64346231712..a475d2a55a1c 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -2127,7 +2127,7 @@ void BlueStore::ExtentMap::reshard( unsigned target = cct->_conf->bluestore_extent_map_shard_target_size; unsigned slop = target * cct->_conf->bluestore_extent_map_shard_target_size_slop; - unsigned extent_avg = bytes / MAX(1, extent_map.size()); + unsigned extent_avg = bytes / MAX(1, extents); dout(20) << __func__ << " extent_avg " << extent_avg << ", target " << target << ", slop " << slop << dendl; -- 2.47.3