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