mirror of
https://github.com/ceph/ceph
synced 2024-12-14 15:35:45 +00:00
Merge pull request #7016 from xiexingguo/xxg-wip-14151
osd: fix sparse-read result code checking logic Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
2533f876b1
@ -4182,6 +4182,11 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
|
||||
data_bl.claim_append(tmpbl);
|
||||
last = miter->first + r;
|
||||
}
|
||||
|
||||
if (r < 0) {
|
||||
result = r;
|
||||
break;
|
||||
}
|
||||
|
||||
// verify trailing hole?
|
||||
if (cct->_conf->osd_verify_sparse_read_holes) {
|
||||
@ -4197,11 +4202,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
|
||||
}
|
||||
}
|
||||
|
||||
if (r < 0) {
|
||||
result = r;
|
||||
break;
|
||||
}
|
||||
|
||||
// Why SPARSE_READ need checksum? In fact, librbd always use sparse-read.
|
||||
// Maybe at first, there is no much whole objects. With continued use, more and more whole object exist.
|
||||
// So from this point, for spare-read add checksum make sense.
|
||||
|
Loading…
Reference in New Issue
Block a user