]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: check against that we don't access violation
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 8 Jul 2016 00:59:08 +0000 (08:59 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 8 Jul 2016 12:44:42 +0000 (20:44 +0800)
Some day we might want make this interface more applicable by handling
the abnormal cases more gracefully...

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/bluestore_types.h

index 44e0e8b5d27594e65ed6c6157d28db4c10db8db9..20a632439f557751ccaee6295099c75ff740bc74 100644 (file)
@@ -283,6 +283,7 @@ struct bluestore_blob_t {
     }
     b_len += b_off;
     while (b_len) {
+      assert(p != extents.end());
       if (!p->is_valid()) {
        return false;
       }