diff options
author | Sage Weil <sage@newdream.net> | 2010-05-25 18:39:06 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-29 12:12:39 -0400 |
commit | a41359fa355e7b450c610ed8e913d5d75c3c9c3b (patch) | |
tree | 6dc6681f4350f0888ddcb55b5a21326069c200b2 /fs/ceph/auth_none.c | |
parent | 09c4d6a7d40dd26c1b35674c582382b7ea551368 (diff) |
ceph: renew auth tickets before they expire
We were only requesting renewal after our tickets expire; do so before
that. Most of the low-level logic for this was already there; just use
it.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/auth_none.c')
-rw-r--r-- | fs/ceph/auth_none.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ceph/auth_none.c b/fs/ceph/auth_none.c index 24407c119291..ad1dc21286c7 100644 --- a/fs/ceph/auth_none.c +++ b/fs/ceph/auth_none.c | |||
@@ -31,6 +31,13 @@ static int is_authenticated(struct ceph_auth_client *ac) | |||
31 | return !xi->starting; | 31 | return !xi->starting; |
32 | } | 32 | } |
33 | 33 | ||
34 | static int should_authenticate(struct ceph_auth_client *ac) | ||
35 | { | ||
36 | struct ceph_auth_none_info *xi = ac->private; | ||
37 | |||
38 | return xi->starting; | ||
39 | } | ||
40 | |||
34 | /* | 41 | /* |
35 | * the generic auth code decode the global_id, and we carry no actual | 42 | * the generic auth code decode the global_id, and we carry no actual |
36 | * authenticate state, so nothing happens here. | 43 | * authenticate state, so nothing happens here. |
@@ -98,6 +105,7 @@ static const struct ceph_auth_client_ops ceph_auth_none_ops = { | |||
98 | .reset = reset, | 105 | .reset = reset, |
99 | .destroy = destroy, | 106 | .destroy = destroy, |
100 | .is_authenticated = is_authenticated, | 107 | .is_authenticated = is_authenticated, |
108 | .should_authenticate = should_authenticate, | ||
101 | .handle_reply = handle_reply, | 109 | .handle_reply = handle_reply, |
102 | .create_authorizer = ceph_auth_none_create_authorizer, | 110 | .create_authorizer = ceph_auth_none_create_authorizer, |
103 | .destroy_authorizer = ceph_auth_none_destroy_authorizer, | 111 | .destroy_authorizer = ceph_auth_none_destroy_authorizer, |