From e8dd0883c1b48f328c78fb5ebfa02318a84b31bf Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 27 Sep 2016 14:02:36 -0400 Subject: [PATCH] os/bluestore: add assert to compress_extent_map Signed-off-by: Sage Weil --- src/os/bluestore/BlueStore.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 923bda285c263..f59159d2c73db 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -1888,6 +1888,8 @@ int BlueStore::ExtentMap::compress_extent_map(uint64_t offset, uint64_t length) if (p != extent_map.begin()) { --p; // start to the left of offset } + // the caller should have just written to this region + assert(p != extent_map.end()); // identify the *next* shard auto pshard = shards.begin(); -- 2.39.5