ceph: make num_fwd and num_retry to __u32
authorXiubo Li <xiubli@redhat.com>
Tue, 25 Jul 2023 09:51:59 +0000 (17:51 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 31 Aug 2023 12:56:27 +0000 (14:56 +0200)
commitce0d5bd3a6c176f9a3bf867624a07119dd4d0878
tree5d2a065219add296e35e8823691130c36d05482e
parent3af5ae22030cb59fab4fba35f5a2b62f47e14df9
ceph: make num_fwd and num_retry to __u32

The num_fwd in MClientRequestForward is int32_t, while the num_fwd
in ceph_mds_request_head is __u8. This is buggy when the num_fwd
is larger than 256 it will always be truncate to 0 again. But the
client couldn't recoginize this.

This will make them to __u32 instead. Because the old cephs will
directly copy the raw memories when decoding the reqeust's head,
so we need to make sure this kclient will be compatible with old
cephs. For newer cephs they will decode the requests depending
the version, which will be much simpler and easier to extend new
members.

Link: https://tracker.ceph.com/issues/62145
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c
fs/ceph/mds_client.h
include/linux/ceph/ceph_fs.h