]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd/PrimaryLogPG: allow trimmed read for OP_CHECKSUM
authorxie xingguo <xie.xingguo@zte.com.cn>
Sun, 24 Sep 2017 00:58:45 +0000 (08:58 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 29 Sep 2017 13:16:19 +0000 (21:16 +0800)
commit1e4263fa5da0534beb53b6cd0d90b4917f9fcad2
tree6a0ad7d014b3e686a7371150bbb4a4632456f5a1
parent421aee3aea959a526ed102035e0ef29ea427f8d8
osd/PrimaryLogPG: allow trimmed read for OP_CHECKSUM

Normal reads support trimmed read length, and so shall checksums!

This fixes occasionally failure of rados/thrash test scripts, e.g.:
(1) create object using WriteOp with random generated length
(2) normal writes might accompany with TruncOp of randomized chosen truncate_size
(3) for ReadOp, pick a random 'length' to read, and do checksum simultaneously
    for the same range ([0, 'length']) to read too.

Since the 'length' for reading is randomized chosen, it might
exceed the current object size, and hence causing an EOVERFLOW error.

Related issues:
http://qa-proxy.ceph.com/teuthology/xxg-2017-09-22_01:52:47-rados-wip-object-logic-size-distro-basic-smithi/1657337
http://qa-proxy.ceph.com/teuthology/xxg-2017-09-22_14:14:19-rados-wip-object-logic-size-distro-basic-smithi/1658015

Fix the above problems by keeping pace with normal reads.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/PrimaryLogPG.cc