mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 06:20:53 +07:00
ceph: return ETIMEDOUT errno to userland when request timed out
req->r_timeout is only used during mounting, so this error will be more accurate. URL: https://tracker.ceph.com/issues/44215 Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
1b0c3b9f91
commit
8ccf7fcce1
@ -2579,7 +2579,7 @@ static void __do_request(struct ceph_mds_client *mdsc,
|
|||||||
if (req->r_timeout &&
|
if (req->r_timeout &&
|
||||||
time_after_eq(jiffies, req->r_started + req->r_timeout)) {
|
time_after_eq(jiffies, req->r_started + req->r_timeout)) {
|
||||||
dout("do_request timed out\n");
|
dout("do_request timed out\n");
|
||||||
err = -EIO;
|
err = -ETIMEDOUT;
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
if (READ_ONCE(mdsc->fsc->mount_state) == CEPH_MOUNT_SHUTDOWN) {
|
if (READ_ONCE(mdsc->fsc->mount_state) == CEPH_MOUNT_SHUTDOWN) {
|
||||||
@ -2753,7 +2753,7 @@ static int ceph_mdsc_wait_request(struct ceph_mds_client *mdsc,
|
|||||||
if (timeleft > 0)
|
if (timeleft > 0)
|
||||||
err = 0;
|
err = 0;
|
||||||
else if (!timeleft)
|
else if (!timeleft)
|
||||||
err = -EIO; /* timed out */
|
err = -ETIMEDOUT; /* timed out */
|
||||||
else
|
else
|
||||||
err = timeleft; /* killed */
|
err = timeleft; /* killed */
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user