]> 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)
commitbad7ef0283982e9dfbef206dd42ea1aa9e7bf28b
treec6460bb777e8be11bf521ff5624fb4159b06c512
parent42f832199dd69b3fbb80b4668f97bee45f4ea946
libceph: clear messenger auth_retry flag if we fault

Commit 404073fdb483 ("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