]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: add sanity check to the order of shards before updating
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 13 Jun 2017 06:11:32 +0000 (14:11 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 13 Jun 2017 13:42:50 +0000 (21:42 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index b0c2e223272f0174fb4353bf7d1eda7462250432..7a9fb4528c0c57ccb7d9118aedc0b5de53d8ea27 100644 (file)
@@ -1939,6 +1939,7 @@ void BlueStore::ExtentMap::update(KeyValueDB::Transaction t,
     auto p = shards.begin();
     auto prev_p = p;
     while (p != shards.end()) {
+      assert(p->shard_info->offset >= prev_p->shard_info->offset);
       auto n = p;
       ++n;
       if (p->dirty) {