]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: add assert to compress_extent_map 11240/head
authorSage Weil <sage@redhat.com>
Tue, 27 Sep 2016 18:02:36 +0000 (14:02 -0400)
committerSage Weil <sage@redhat.com>
Tue, 27 Sep 2016 18:02:36 +0000 (14:02 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index 923bda285c26357c8c1d6bf5ca5b89ab50bf3658..f59159d2c73db14840839442d03ae79e33566444 100644 (file)
@@ -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();