From 4e33747f41c4ae573dd1be8aadba0ff0940065b8 Mon Sep 17 00:00:00 2001 From: xiexingguo Date: Tue, 11 Oct 2016 22:16:34 +0800 Subject: [PATCH] os/bluestore: add sanity check to shard offset when updating Signed-off-by: xiexingguo --- src/os/bluestore/BlueStore.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 2da1633c090e7..aee0d3caff8fb 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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 && -- 2.39.5