]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: clear messenger auth_retry flag if we fault
authorIlya Dryomov <idryomov@gmail.com>
Wed, 13 Jan 2016 13:32:57 +0000 (14:32 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 21 Jan 2016 18:36:08 +0000 (19:36 +0100)
commit8b983697158e64e4bde02119adb3893fdb4cd677
treec6460bb777e8be11bf521ff5624fb4159b06c512
parente29855f851c792c36df3f7123592997ece55c33a
libceph: clear messenger auth_retry flag if we fault

Commit 0c744be22c88 ("libceph: clear messenger auth_retry flag when we
authenticate") got us only half way there.  We clear the flag if the
second attempt succeeds, but it also needs to be cleared if that
attempt fails, to allow for the exponential backoff to kick in.
Otherwise, if ->should_authenticate() thinks our keys are valid, we
will busy loop, incrementing auth_retry to no avail:

    process_connect ffff880079a63830 got BADAUTHORIZER attempt 1
    process_connect ffff880079a63830 got BADAUTHORIZER attempt 2
    process_connect ffff880079a63830 got BADAUTHORIZER attempt 3
    process_connect ffff880079a63830 got BADAUTHORIZER attempt 4
    process_connect ffff880079a63830 got BADAUTHORIZER attempt 5
    ...

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
net/ceph/messenger.c