]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: add sanity check to shard offset when updating
authorxiexingguo <xie.xingguo@zte.com.cn>
Tue, 11 Oct 2016 14:16:34 +0000 (22:16 +0800)
committerxiexingguo <xie.xingguo@zte.com.cn>
Tue, 11 Oct 2016 14:16:34 +0000 (22:16 +0800)
Signed-off-by: xiexingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index 2da1633c090e78707ae0d97f2a82edc80f835531..aee0d3caff8fb08b8bbd5580dc3e920486ebe555 100644 (file)
@@ -1520,6 +1520,7 @@ bool BlueStore::ExtentMap::update(Onode *o, KeyValueDB::Transaction t,
                 << p->offset << std::dec << " is " << bl.length()
                 << " bytes (was " << p->shard_info->bytes << ") from " << n
                 << " extents" << dendl;
+       assert(p->shard_info->offset == p->offset);
        p->shard_info->bytes = bl.length();
        p->shard_info->extents = n;
        if (!force &&