os/bluestore: use blob internal settings for csum checking

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>
This commit is contained in:
xie xingguo 2016-09-22 15:38:44 +08:00
parent 36ea571027
commit 62ba4d4e53

View 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;