mirror of
https://github.com/ceph/ceph
synced 2025-02-23 02:57:21 +00:00
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:
parent
36ea571027
commit
62ba4d4e53
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user