]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: handle min_compat_client type change 27855/head
authorKefu Chai <kchai@redhat.com>
Mon, 29 Apr 2019 10:20:46 +0000 (18:20 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 4 May 2019 06:51:27 +0000 (02:51 -0400)
commite9e6c64c803c94f9f77e001321029fa63b6cf6ed
tree107f087af412a998ac6ed8b674fcdd0e489f4843
parentdf771861f1b9fbb1e1e5a60e4afddadff5b67c69
mds: handle min_compat_client type change

in previous change, MDSMap::min_compat_client was changed from int8_t to
ceph_release_t, i.e. uint8_t, and in
Server::update_required_client_features(), we check the
MDSMap::min_compat_client to see if it is greater than given version, so
a negative "-1" would overflow and be interpreted as a 255, hence will
be always greater than whatever version is compared. so we need to
bump up the encoding version, and

* normalize the number if it is -1
* ignore the number which is way too large.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mds/MDSMap.cc
src/mds/MDSRank.cc