The 'from' value is an fd, not an offset. We want 'r' to be the number of
bytes copied, or len.
It looks like this has been broken since
9499cdcd87ddac4a91abffe401baddb91f8a11d5
Fixes: http://tracker.ceph.com/issues/23298
Signed-off-by: Sage Weil <sage@redhat.com>
if (r < 0 && replaying) {
assert(r == -ERANGE);
derr << __FUNC__ << ": short source tolerated because we are replaying" << dendl;
- r = pos - from;;
+ r = len;
}
assert(replaying || pos == end);
if (r >= 0 && !skip_sloppycrc && m_filestore_sloppy_crc) {