]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: use blob internal settings for csum checking
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 22 Sep 2016 07:38:44 +0000 (15:38 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 22 Sep 2016 14:43:17 +0000 (22:43 +0800)
This is because:
1. It is more accurate, as the global csum settings may change dynamically.
2. bluestore_blob_t::verify_csum() can handle both csum-on and csum-off correctly.

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

index 6c5a9d153b6ef7f39ce5108ecba059c242b13266..1da5cc056e5e453eb49cb4eb120e58130926d194 100644 (file)
@@ -4820,8 +4820,7 @@ int BlueStore::_verify_csum(OnodeRef& o,
 {
   int bad;
   uint64_t bad_csum;
-  int r = csum_type != bluestore_blob_t::CSUM_NONE ?
-    blob->verify_csum(blob_xoffset, bl, &bad, &bad_csum)  :0;
+  int r = blob->verify_csum(blob_xoffset, bl, &bad, &bad_csum);
   if (r < 0) {
     if (r == -1) {
       vector<bluestore_pextent_t> pex;