aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-02-02 19:21:06 -0500
committerSage Weil <sage@newdream.net>2010-02-10 18:04:47 -0500
commit9bd2e6f8ba71facf1cadb7154a7e0e4d345a6aba (patch)
tree1c1bb4d2f769eca05443b98334fe0fbdb3b977c2 /fs/ceph/super.c
parent8b6e4f2d8b21c25225b1ce8d53a2e03b92cc8522 (diff)
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>
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r--fs/ceph/super.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index cd81c84e96fc..3a2548951fe6 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -542,7 +542,7 @@ static struct ceph_client *ceph_create_client(struct ceph_mount_args *args)
542 542
543 mutex_init(&client->mount_mutex); 543 mutex_init(&client->mount_mutex);
544 544
545 init_waitqueue_head(&client->mount_wq); 545 init_waitqueue_head(&client->auth_wq);
546 546
547 client->sb = NULL; 547 client->sb = NULL;
548 client->mount_state = CEPH_MOUNT_MOUNTING; 548 client->mount_state = CEPH_MOUNT_MOUNTING;
@@ -550,7 +550,7 @@ static struct ceph_client *ceph_create_client(struct ceph_mount_args *args)
550 550
551 client->msgr = NULL; 551 client->msgr = NULL;
552 552
553 client->mount_err = 0; 553 client->auth_err = 0;
554 atomic_long_set(&client->writeback_count, 0); 554 atomic_long_set(&client->writeback_count, 0);
555 555
556 err = bdi_init(&client->backing_dev_info); 556 err = bdi_init(&client->backing_dev_info);
@@ -742,13 +742,13 @@ static int ceph_mount(struct ceph_client *client, struct vfsmount *mnt,
742 742
743 /* wait */ 743 /* wait */
744 dout("mount waiting for mon_map\n"); 744 dout("mount waiting for mon_map\n");
745 err = wait_event_interruptible_timeout(client->mount_wq, /* FIXME */ 745 err = wait_event_interruptible_timeout(client->auth_wq,
746 have_mon_map(client) || (client->mount_err < 0), 746 have_mon_map(client) || (client->auth_err < 0),
747 timeout); 747 timeout);
748 if (err == -EINTR || err == -ERESTARTSYS) 748 if (err == -EINTR || err == -ERESTARTSYS)
749 goto out; 749 goto out;
750 if (client->mount_err < 0) { 750 if (client->auth_err < 0) {
751 err = client->mount_err; 751 err = client->auth_err;
752 goto out; 752 goto out;
753 } 753 }
754 } 754 }