ceph: stop forwarding the request when exceeding 256 times
authorXiubo Li <xiubli@redhat.com>
Tue, 29 Mar 2022 04:48:01 +0000 (12:48 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 25 May 2022 18:45:13 +0000 (20:45 +0200)
commit1980b1bf17a4975fee5ee42df167f50f7f67b3d9
tree85ccf90fb9122521b686bc00e4e11a710da75f31
parent6c1dc50284c4dab9f1e563efba6f9c4a47af894a
ceph: stop forwarding the request when exceeding 256 times

The type of 'num_fwd' in ceph 'MClientRequestForward' is 'int32_t',
while in 'ceph_mds_request_head' the type is '__u8'. So in case
the request bounces between MDSes exceeding 256 times, the client
will get stuck.

In this case it's ususally a bug in MDS and continue bouncing the
request makes no sense.

URL: https://tracker.ceph.com/issues/55130
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Luís Henriques <lhenriques@suse.de>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c