Merge pull request #41896 from ifed01/wip-ifed-verbose-kernel-read

blk/KernelDevice: be more verbose on read errors.

Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2021-06-19 21:02:18 +08:00 committed by GitHub
commit c5ff2450a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1052,13 +1052,14 @@ int KernelDevice::read(uint64_t off, uint64_t len, bufferlist *pbl,
<< age
<< "s" << dendl;
}
if (r < 0) {
if (ioc->allow_eio && is_expected_ioerr(r)) {
r = -EIO;
} else {
r = -errno;
}
derr << __func__ << " 0x" << std::hex << off << "~" << left
<< std::dec << " error: " << cpp_strerror(r) << dendl;
goto out;
}
ceph_assert((uint64_t)r == len);