From: xie xingguo Date: Tue, 13 Jun 2017 05:07:14 +0000 (+0800) Subject: os/bluestore: make sure we update shards and extent_map_shards simutaneously X-Git-Tag: v12.1.0~108^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8bb19f3a8505dc8d9835b0cffc42d8de74687660;p=ceph-ci.git os/bluestore: make sure we update shards and extent_map_shards simutaneously Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index c1e42e226d8..8a95ff78391 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -2166,6 +2166,8 @@ void BlueStore::ExtentMap::reshard( shards.insert(shards.begin() + si_begin, new_shard_info.size(), Shard()); si_end = si_begin + new_shard_info.size(); + assert(sv.size() == shards.size()); + // note that we need to update every shard_info of shards here, // as sv might have been totally re-allocated above for (unsigned i = 0; i < shards.size(); i++) {