ceph: stop retrying the request when exceeding 256 times
authorXiubo Li <xiubli@redhat.com>
Wed, 30 Mar 2022 06:39:33 +0000 (14:39 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 25 May 2022 18:45:13 +0000 (20:45 +0200)
commit546a5d6122faae161cb59159e8af8518130efeab
tree2945550fe7b8a92fb38a04ad676d86304e842e94
parent1980b1bf17a4975fee5ee42df167f50f7f67b3d9
ceph: stop retrying the request when exceeding 256 times

The type of 'r_attempts' in kernel 'ceph_mds_request' is 'int',
while in 'ceph_mds_request_head' the type of 'num_retry' is '__u8'.
So in case the request retries exceeding 256 times, the MDS will
receive a incorrect retry seq.

In this case it's ususally a bug in MDS and continue retrying the
request makes no sense. For now let's limit it to 256. In future
this could be fixed in ceph code, so avoid using the hardcode here.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c