From: wangzhengyong Date: Mon, 13 Mar 2017 03:03:35 +0000 (+0800) Subject: os/bluestore: fix bug for calc extent_avg in reshard function X-Git-Tag: v12.0.2~329^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=63392aa197c74a03f6cef72106913da0bef64bc8;p=ceph.git os/bluestore: fix bug for calc extent_avg in reshard function Signed-off-by: wangzhengyong@cmss.chinamobile.com --- 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;