]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix bug for calc extent_avg in reshard function 13931/head
authorwangzhengyong <wangzhengyong@cmss.chinamobile.com>
Mon, 13 Mar 2017 03:03:35 +0000 (11:03 +0800)
committerwangzhengyong <wangzhengyong@cmss.chinamobile.com>
Mon, 13 Mar 2017 03:03:35 +0000 (11:03 +0800)
Signed-off-by: wangzhengyong@cmss.chinamobile.com
src/os/bluestore/BlueStore.cc

index f64346231712893613914508e4723e1fe1daa503..a475d2a55a1cb9ced941e86e6eb95ec3fd0150f6 100644 (file)
@@ -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;