]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: fix mdsmap cluster available check based on laggy number
authorXiubo Li <xiubli@redhat.com>
Tue, 26 Nov 2019 12:24:21 +0000 (07:24 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 10 Jan 2020 10:11:06 +0000 (11:11 +0100)
commit57b18902f085e166d5c8c0b208e8344eebaf553d
treeffb7ec831e9da4a7c6feacd3cad247c5821b946c
parente60220d04d5274bc51ed767262e3b0fa180ca4d0
ceph: fix mdsmap cluster available check based on laggy number

In case the max_mds > 1 in MDS cluster and there is no any standby
MDS and all the max_mds MDSs are in up:active state, if one of the
up:active MDSs is dead, the m->m_num_laggy in kclient will be 1.
Then the mount will fail without considering other healthy MDSs.

There manybe some MDSs still "in" the cluster but not in up:active
state, we will ignore them. Only when all the up:active MDSs in
the cluster are laggy will treat the cluster as not be available.

In case decreasing the max_mds, the cluster will not stop the extra
up:active MDSs immediately and there will be a latency. During it
the up:active MDS number will be larger than the max_mds, so later
the m_info memories will 100% be reallocated.

Here will pick out the up:active MDSs as the m_num_mds and allocate
the needed memories once.

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