• Yanhu Cao's avatar
    ceph: use frag's MDS in either mode · 224c7b67
    Yanhu Cao authored
    When doing some tests with multiple mds, we were seeing many mds
    forwarding requests between them, causing clients to resend.
    
    If the request is a modification operation and the mode is set to
    USE_AUTH_MDS, then the auth mds should be selected to handle the
    request. If auth mds for frag is already set, then it should be returned
    directly without further processing.
    
    The current logic is wrong because it only returns directly if
    mode is USE_AUTH_MDS, but we want to do that for all modes. If we don't,
    then when the frag's mds is not equal to cap session's mds, the request
    will get sent to the wrong MDS needlessly.
    
    Drop the mode check in this condition.
    Signed-off-by: default avatarYanhu Cao <gmayyyha@gmail.com>
    Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
    Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
    224c7b67
mds_client.c 131 KB