summaryrefslogtreecommitdiffstats
path: root/fs/ceph/auth_none.c
diff options
context:
space:
mode:
authorSage Weil2010-05-26 00:39:06 +0200
committerSage Weil2010-05-29 18:12:39 +0200
commita41359fa355e7b450c610ed8e913d5d75c3c9c3b (patch)
tree6dc6681f4350f0888ddcb55b5a21326069c200b2 /fs/ceph/auth_none.c
parentceph: do not resend mon requests on auth ticket renewal (diff)
downloadkernel-qcow2-linux-a41359fa355e7b450c610ed8e913d5d75c3c9c3b.tar.gz
kernel-qcow2-linux-a41359fa355e7b450c610ed8e913d5d75c3c9c3b.tar.xz
kernel-qcow2-linux-a41359fa355e7b450c610ed8e913d5d75c3c9c3b.zip
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.c8
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)
return !xi->starting;
}
+static int should_authenticate(struct ceph_auth_client *ac)
+{
+ struct ceph_auth_none_info *xi = ac->private;
+
+ return xi->starting;
+}
+
/*
* the generic auth code decode the global_id, and we carry no actual
* authenticate state, so nothing happens here.
@@ -98,6 +105,7 @@ static const struct ceph_auth_client_ops ceph_auth_none_ops = {
.reset = reset,
.destroy = destroy,
.is_authenticated = is_authenticated,
+ .should_authenticate = should_authenticate,
.handle_reply = handle_reply,
.create_authorizer = ceph_auth_none_create_authorizer,
.destroy_authorizer = ceph_auth_none_destroy_authorizer,