summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2020-02-24 06:23:11 +0300
committerIlya Dryomov <idryomov@gmail.com>2020-03-30 13:42:41 +0300
commit8ccf7fcce191c11a2d85ef58ad1a82dd6c7e2f7c (patch)
treeb8d2f43219e123bdec8e0fba15e93fdf4113afb3 /fs
parent1b0c3b9f91f0df03088d293fc9e62743fd789ad2 (diff)
downloadlinux-8ccf7fcce191c11a2d85ef58ad1a82dd6c7e2f7c.tar.xz
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/mds_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index fab9d6461a65..2da98b6cc064 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -2579,7 +2579,7 @@ static void __do_request(struct ceph_mds_client *mdsc,
if (req->r_timeout &&
time_after_eq(jiffies, req->r_started + req->r_timeout)) {
dout("do_request timed out\n");
- err = -EIO;
+ err = -ETIMEDOUT;
goto finish;
}
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)
err = 0;
else if (!timeleft)
- err = -EIO; /* timed out */
+ err = -ETIMEDOUT; /* timed out */
else
err = timeleft; /* killed */
}