]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: add possible_max_rank and make the code more readable
authorXiubo Li <xiubli@redhat.com>
Wed, 4 Dec 2019 11:57:39 +0000 (06:57 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 10 Jan 2020 10:11:06 +0000 (11:11 +0100)
commit41c8dfbe159144a8a0d72be63161a2dcd15b3f94
tree40e3f85f6dd4268066bf26a427bd341e1102927d
parentcd17c453dcbb91916e54df7d2cdd321fc1a58b86
ceph: add possible_max_rank and make the code more readable

The m_num_mds here is actually the number for MDSs which are in
up:active status, and it will be duplicated to m_num_active_mds,
so remove it.

Add possible_max_rank to the mdsmap struct and this will be
the correctly possible largest rank boundary.

Remove the special case for one mds in __mdsmap_get_random_mds(),
because the validate mds rank may not always be 0.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/ceph/debugfs.c
fs/ceph/mds_client.c
fs/ceph/mdsmap.c
include/linux/ceph/mdsmap.h