ceph: allow renewal of auth credentials
Add infrastructure to allow the mon_client to periodically renew its auth
credentials. Also add a messenger callback that will force such a renewal
if a peer rejects our authenticator.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index cd81c84..3a25489 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -542,7 +542,7 @@
mutex_init(&client->mount_mutex);
- init_waitqueue_head(&client->mount_wq);
+ init_waitqueue_head(&client->auth_wq);
client->sb = NULL;
client->mount_state = CEPH_MOUNT_MOUNTING;
@@ -550,7 +550,7 @@
client->msgr = NULL;
- client->mount_err = 0;
+ client->auth_err = 0;
atomic_long_set(&client->writeback_count, 0);
err = bdi_init(&client->backing_dev_info);
@@ -742,13 +742,13 @@
/* wait */
dout("mount waiting for mon_map\n");
- err = wait_event_interruptible_timeout(client->mount_wq, /* FIXME */
- have_mon_map(client) || (client->mount_err < 0),
+ err = wait_event_interruptible_timeout(client->auth_wq,
+ have_mon_map(client) || (client->auth_err < 0),
timeout);
if (err == -EINTR || err == -ERESTARTSYS)
goto out;
- if (client->mount_err < 0) {
- err = client->mount_err;
+ if (client->auth_err < 0) {
+ err = client->auth_err;
goto out;
}
}