]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: make sure we update shards and extent_map_shards simutaneously
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 13 Jun 2017 05:07:14 +0000 (13:07 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 13 Jun 2017 08:17:18 +0000 (16:17 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index c1e42e226d83de2e2a2f30b97dd3ea7889424e38..8a95ff783912a530c2803ee5c174d8a8aebe29fa 100644 (file)
@@ -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++) {